[XML-SIG] Question about namespace declarations

Thomas B. Passin tpassin@home.com
Sat, 23 Jun 2001 10:26:51 -0400


[Martin v. Loewis]

> >   This makes me think that both "xmlns" and "xmlns:*" should be
> > presented as attributes without namespaces in the DOM.  Can anyone
> > point to references that extend or override this recommendation?
>
 Strictly speaking, "xmlns" is a "reserved attribute (Namespaces Rec,
section 2).  That means it has special behavior that ordinary attributes
don't.  DOM level 2 (Core) (section 1.1.8) says:

"As far as the DOM is concerned, special attributes used for declaring XML
namespaces are still exposed and can be manipulated just like any other
attribute. However, nodes are permanently bound to namespace URIs as they
get created. Consequently, moving a node within a document, using the DOM,
in no case results in a change of its namespace prefix or namespace URI.
Similarly, creating a node with a namespace prefix and namespace URI, or
changing the namespace prefix of a node, does not result in any addition,
removal, or modification of any special attributes for declaring the
appropriate XML namespaces. "

I'm not clear, though, whether this would require any different handling
from ordinary attributes.

I don't see how "xmlns:" could be seen as an attribute because it doesn't
get used by itself that way.

Cheers,

Tom P