Jan Grant [mailto:Jan.Grant@bristol.ac.uk] wrote: [snip] >Rather surprisingly, an unqualified attribute (in XML) doesn't inherit >the NS of its element; nor is it implicitly qualified with the default >NS. Instead, it lives in a global "unqualified" space. Yech. > >jan This is not quite correct, it lives in a "per-element" space - just think of DTD validation: <!ELEMENT X EMPTY> <!ATTLIST X about CDATA #FIXED "an attribute scoped by the 'X' element type"> <!ELEMENT Y EMPTY> <!ATTLIST Y about CDATA #FIXED "another distinct attribute scoped by the 'Y' element type"> Given that for the purposes of DTD validation, "eg:Z" is not interpreted as a QName (i.e. not converted to a namespace-URI+localpart pair): <!ELEMENT eg:Z EMPTY> <!ATTLIST eg:Z about CDATA #FIXED "yet another distinct attribute scoped by the 'eg:Z' element type"> I assume all this is histerical (I mean historical ;-) - surely inherited from SGML. XML Namespaces came along after XML 1.0 and DTDs are unaware of its semantics - hence one reason (among others) for the creation of XML Schema for document validation, I suppose. regards Lee
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:49 GMT