W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

Node::prefix modification

From: Glenn Adams <glenn@xfsi.com>
Date: Mon, 11 Feb 2002 16:24:51 -0500
To: "Www-Dom@W3.Org" <www-dom@w3.org>
Message-ID: <000301c1b342$8b9c6320$0201a8c0@xfsi.com>

(1) What exception (if any) should be thrown when setting the value of the prefix attribute on a node which does not admit a prefix, e.g., a Comment Node?

(2) DOM-2 (and 3) says [A] "Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable" and [B] "For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null." These two statements appear to be inconsistent in the following case:

Element e = doc.createElement("foo");
e.setPrefix("p");

According to [A], the above would change the nodeName and tagName of e to "p:foo" and change prefix to "p"; however, according to [B], prefix should be null.

Glenn
Received on Monday, 11 February 2002 16:24:38 GMT

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