This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: keys and idrefs - XSLT2 request?


David Carlisle <davidc@nag.co.uk> writes:

<snip/>

> That's not to say I think schema are bad (as you may have seen on schema
> list I'm currently trying to recast the dtds that I maintain into
> schema) but that I can't see when I would want to use any structural
> information in a stylesheet, once I know that the instance is schema
> valid.

I think the point about using complex types is simple, and easily
illustrated.  The point about named types is that by declaring type X, 
and then using it for elements x _and_ y, you capture something
important about your document type and improve its maintainability.

Now you can write a stylesheet which matches X, and does something
with the b and/or c children, independent of which element happens to
have been validated with X.  Consider the Address type from the
Purchase Order schema in the XML Schema Primer [1] for a more
realistic example.  A stylesheet module for that type could be
imported into any stylesheet for any document type which imported the
Address schema module.

One reason for the invariants which type derivation enforces in XML
Schema is so that type-matching template rules can depend on what they 
get.

Hope this helps

ht

[1] http://www.w3.org/TR/xmlschema-0/
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]