[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: keys and idrefs - XSLT2 request?

Subject: Re: keys and idrefs - XSLT2 request?
From: ht@xxxxxxxxxxxxxxx (Henry S. Thompson)
Date: 16 Oct 2001 09:45:32 +0100
henry r. thompson
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.