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

Re: namespaces and DTD interactions

From: Fred L. Drake, Jr. <fdrake@acm.org>
Date: Tue, 20 Mar 2001 17:11:04 -0500 (EST)
Message-ID: <15031.54648.437637.114864@localhost.localdomain>
To: Philippe Le Hegaret <plh@w3.org>, "Joseph Kesselman" <keshlam@us.ibm.com>
Cc: www-dom@w3.org

Philippe Le Hegaret writes:
 > null, following the XML namespace recommendation:
 > 
 > [[[
 > Note that default namespaces do not apply directly to attributes. 
 > ]]]

  Thanks; this was what I expected, but someone else on my project
wrote a test case that assumed differently.  Since I know that person
has spent at least as much time in the various recommendations as I
have, and possibly more, I figured I'd better make sure I wasn't
missing an interaction somewhere.

Joseph Kesselman writes:
 > It is possible to use the DOM APIs to explicitly create an Attr which has a
 > Namespace but does not have a prefix. It is the serializer's reponsibility

  The aspect of my sample document which was of the most interest was
that the result of the getAttributeNodeNS() was an attribute specified
in the DTD.  The person who wrote test cases for the DOM
implementation expected the expression I posted to return a non-null
value.  I don't think there's *any* way to get an ATTRIBUTE_NODE with
a namespaceURI without specifying it in the document instance or
adding it programmatically to the node (in which case the "specified"
attribute is true).  The test was specifically checking that the node
became a specified node and did not cause the length of the
"attributes" attribute of the ownerElement to change.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations
Received on Tuesday, 20 March 2001 17:17:50 GMT

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