W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: namespaces and DTD interactions

From: Philippe Le Hegaret <plh@w3.org>
Date: Tue, 20 Mar 2001 16:05:37 -0500
Message-ID: <3AB7C621.ADBD4852@w3.org>
To: "Fred L. Drake, Jr." <fdrake@acm.org>
Cc: www-dom@w3.org
"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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT