RE: #rdf-ns-prefix-confusion

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

Received on Wednesday, 16 May 2001 11:16:14 UTC