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

RE: Substitution Groups


xml substitution group
> File A defines a complex data type AType and an element A of 
> that type.
> 
> File B defines a complex type BType that is an extension of 
> AType and an
> element B of that type. Element B is in the substitution 
> group for element
> A.
> 
> It as an error if File B does not <include> file A since the 
> XML Processor
> can't find the head of the substitution group.
> 
> File A must <include> file B otherwise an instance that uses 
> element B will
> be invalid.

The schema rec contains some contradictory statements on this.

Section 3.15.3 says:

"For a .QName. to resolve to a schema component of a specified kind all of
the following must be true:
1 That component is a member of the value of the appropriate property of the
schema which corresponds to the schema document within which the .QName.
appears,": in other words, component references in document A must resolve
to something in the include tree rooted at A. 

However, section 3.1.3 and elsewhere contain statements like "Forward
reference to named definitions and declarations is allowed, both within and
between .schema documents.." with the implication that when a component A
references a component B, component B can be anywhere: it doesn't have to be
in a schema document included or imported by the document containing A.

The advice I've had on xmlschema-dev (and which I've implemented in Saxon)
is that the second statement is correct and the first one is wrong.

Given this confusion in the spec, however, it's not surprising to find
differences between implementations.

Michael Kay
http://www.saxonica.com/



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.