Re: Node.setPrefix() documentation

Garret Wilson wrote:

> In the documentation for interface Node, the documentation states that
> Node.setPrefix() can throw a DOMException with type NAMESPACE_ERR in the
> following instances:
> 
> <DOM2Core20001113>
> NAMESPACE_ERR: Raised if the specified prefix is malformed, if the
> namespaceURI of this node is null, if the specified prefix is "xml" and the
> namespaceURI of this node is different from
> "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the
> specified prefix is "xmlns" and the namespaceURI of this node is different
> from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and
> the qualifiedName of this node is "xmlns" [Namespaces].
> </DOM2Core20001113>
> 
> Should the last phrase, "if this node is an attribute and the qualifiedName
> of this node is 'xmlns'" really state, "if this node is an attribute and the
> prefix of this node is 'xmlns'"?


I believe that this last statement was intended to cover the case where 
xmlns is NOT theprefix, but it is the attribute name, which is how the 
default namespacefor elements is established.  This is a kink in the 
rules for associating URIs with namespaces.  Thus, in this case, it is 
the qualified name, not the prefix. 

Ray Whitmer
rayw@netscape.com

Received on Wednesday, 20 December 2000 12:22:20 UTC