OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Substitution Groups

[ Lists Home | Date Index | Thread Index ]

> 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/






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS