W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: Node.setPrefix() documentation

From: Ray Whitmer <rayw@netscape.com>
Date: Wed, 20 Dec 2000 09:31:40 -0800
Message-ID: <3A40ECFC.9000107@netscape.com>
To: Garret Wilson <garret@globalmentor.com>
CC: www-dom list <www-dom@w3.org>
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 GMT

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