W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2012

Re: Why can an element in an included no-namespace schema reference a type in the including schema when there is no default namespace declaration?

From: Michael Kay <mike@saxonica.com>
Date: Sat, 28 Jan 2012 23:22:35 +0000
Message-ID: <4F24833B.3050607@saxonica.com>
To: xmlschema-dev@w3.org
On 28/01/2012 23:00, Costello, Roger L. wrote:
> Why can element B2 reference type XYZ without a default namespace declaration but element A1 couldn't?
> /Roger
Chameleon includes are described differently in XSD 1.1 from the way 
they are described in XSD 1.0, though the intent was merely to provide a 
more rigorous description, not to change the behaviour.

In 1.1 the description is in terms of a stylesheet: see


When this stylesheet sees type="xyz", it transforms it into 
type="n:xyz", where n is a namespace prefix that has been bound to the 
new target namespace.

More generally, the effect of the chameleon include is to take the 
included no-namespace schema, and transform it (a) so that all 
components are declared to be in the target namespace, and (b) all 
references to components in no namespace are converted into references 
to components in the target namespace with the same local name.

Michael Kay
Received on Saturday, 28 January 2012 23:22:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:20 UTC