>Do you want to boil that down to the raw facts,
>just so that there is no confusion?
Sorry; overcompensated writer's block <sigh/>... If you're using the DOM
Level 2 namespace-aware calls to build and probe the DOM, and assuming I'm
awake, this should work out as follows.
> <foo xmlns:bar="xxx">
> <bar:baz/>
> </foo>
Element
nodeName = "foo"
prefix = null (unspecified)
localName = "foo"
namespaceURI = null (global/unspecified)
has an Attr with
nodeName = "xmlns:bar"
prefix ="xmlns"
localName = "bar"
namespaceURI = "http://www.w3.org/2000/xmlns/"
nodeValue="xxx"
and contains (along with whitespace Text nodes) a child Element with
nodeName = "bar:baz"
prefix = "bar"
localName = "baz"
namespaceURI = "xxx"
> <foo xmlns="xxx"/>
> <baz/>
> </foo>
Element
nodeName = "foo"
prefix = null (unspecified)
localName = "foo"
namespaceURI = null (global/unspecified)
has an Attr with
nodeName = "xmlns"
prefix = null (unspecified)
localName = "xmlns"
namespaceURI = "http://www.w3.org/2000/xmlns/"
nodeValue="xxx"
and contains (along with whitespace Text nodes) a child Element with
nodeName = "baz"
prefix = null (unspecified)
localName = "baz"
namespaceURI = "xxx"
Note that the localname/namespaceURI bindings are the same in both
documents -- which makes sense; both express the same semantics.
Also note that if you insist on using DOM Level 1 factory methods to build
the nodes, you wind up with DOM Level 1 nodes -- the nodename gets set,
none of prefix, namespaceURI, or localName will. Intermixing level 1 and
level 2 nodes is _NOT_ recommended.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]