Re: [xml-dev] How to design XML to have broad utility and yet also enable efficient application processing?

From
Michael Kay <>
To
Stephen Cameron <>
Date
2013-11-22T08:19:16Z
ID
<>
Thread
Re: [xml-dev] How to design XML to have broad utility and yet also enable efficient application processing?
> 
> 
> 
> "we're so used to people not getting namespaces right that we hardly even notice any more"
> 
> Some simple examples would be much appreciated, for my education.
> 

Cases of beginners getting namespaces wrong are too legion to be interesting. But perhaps a more interesting case is that XSLT, despite herculean efforts to do the right thing, still struggles with some simple cases. For example given this XML fragment (actually an XSD fragment)

<xs:schema xmlns="http://something" xmlns:xs="theUsual" xmlns:t="http://t">
<xs:complexType name="T">
  <xs:restriction base="t:base">
    <xs:group ref="agroup" xmlns=""/>
  </xs:restriction>
</xsl:complexType>
</xs:schema>

an xsl:copy-of instruction applied to the xs:complexType element will lose the namespace undeclaration xmlns="", and thus invalidate the QName-valued attribute ref="agroup".

We've spent untold hours of WG time trying to find a solution to this bug, without success. If we can't get it right, how can mere mortals with more important things in their lives to worry about?

Sorry, I just noticed you asked for simple examples. If only namespaces were simple.

Michael Kay
Saxonica