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?

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

http://www.w3.org/TR/2012/PR-xmlschema11-1-20120119/#chameleon-xslt

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
Saxonica

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