Re: namespaces and DTD interactions

"Fred L. Drake, Jr." wrote:
> 
>   Let's assume we have the following XML document:
> 
> <!DOCTYPE doc [
>   <!ELEMENT doc EMPTY>
>   <!ATTLIST doc foo CDATA "bar">
> ]>
> <doc xmlns="urn:my-scheme:my-namespace"/>
> 
>   If 'doc' holds my Document object, should I expect
> 
>         doc.documentElement.getAttributeNodeNS(
>             "urn:my-scheme:my-namespace", "foo")
> 
> to return an ATTRIBUTE_NODE referring to the foo attribute, or should
> it return null?

null, following the XML namespace recommendation:

[[[
Note that default namespaces do not apply directly to attributes. 
]]]

-- Namespaces in XML
http://www.w3.org/TR/1999/REC-xml-names-19990114/#scoping
Thu, 14 Jan 1999 22:24:57 GMT

Philippe

Received on Tuesday, 20 March 2001 16:05:43 UTC