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

Re: setting Node.prefix

From: Garret Wilson <garret@globalmentor.com>
Date: Fri, 22 Dec 2000 07:45:35 -0800
Message-ID: <007501c06c2e$3c0db2c0$7245a640@pacbell.net>
To: "Philippe Le Hegaret" <plh@w3.org>
Cc: "www-dom list" <www-dom@w3.org>
Thanks, Philippe.

> Now, if you try to set the prefix with a null namespaceURI, you'll get

Right; I'm assuming (although I didn't state it) that one sets the namespace
URI first.

> There is no way to set the prefix on a DOM Level 1 node.

There is not, but I'm talking about setting the prefix on a DOM Level 2 node
that has been created with the DOM Level 1 method Document.createElement().
I can't find in the spec anywhere where it says one cannot set a prefix on
such an element. It does say that, "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." But
if this implies that the prefix cannot be set, is there an exception thrown,
or is the new prefix simply ignored?

> Node.nodeName is read only. You can't set it.

You're completely right. I was overthinking that...

Received on Friday, 22 December 2000 10:46:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC