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

RE: Controlled Intermixing of Namespaced Element Types

From: Michael Kay <mike@saxonica.com>
Date: Thu, 24 Mar 2005 15:46:05 -0000
To: "'Eliot Kimber'" <ekimber@innodata-isogen.com>, "'xml-schema-dev'" <xmlschema-dev@w3.org>
Message-ID: <E1DEUaG-0001Oq-Ke@frink.w3.org>
RE: Controlled Intermixing of Namespaced Element Types

> I'm thinking mostly about generalized processors that want to 
> be able to
> examine the type heirarchy of an element to see if it is a type they
> recognize, i.e., in this example a generic table renderer that expects
> the base types of table elements to be types it recognizes. I need to
> see what the XSLT processing implications are....

There's a lot of support for this kind of thing in XPath 2.0 and XSLT 2.0.

<xsl:template match="schema-element(ABC)">

matches any element whose name is ABC or a name in the substitution group of
ABC (which must be the name of a global element declaration)

<xsl:template match="element(*, XYZtype)">

matches any element whose schema-type is XYZtype or a type derived from
XYZtype, which must be a named simple or complex type definition in the
schema.

So in principle the mechanisms are there to define processing at whatever
level of the type hierarchy you want, and this applies whether you are
specializing by using substitution groups or by deriving types. 

But I agree with you that it's not easy to work out which of these
facilities to use in a given situation.

Michael Kay
http://www.saxonica.com/
Received on Thursday, 24 March 2005 15:49:20 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

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-2007 All Rights Reserved.