Re: namespaces and DTD interactions

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 UTC