[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: keys and idrefs - XSLT2 request?
David Carlisle <davidc@xxxxxxxxx> 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@xxxxxxxxxxxxxxx URL: http://www.ltg.ed.ac.uk/~ht/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|