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

Re: NamedNodeMap

From: <keshlam@us.ibm.com>
Date: Sun, 5 Mar 2000 15:06:18 -0500
To: Dieter Köhler <dieter.koehler@ppp.uni-bamberg.de>
cc: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <85256899.006E71E8.00@D51MTA03.pok.ibm.com>
>NamedNodeMap.setNamedItem and setNamedItemNS:  What happens if the
>node which is specified by arg is already in use in another
>NamedNodeMap or part of a DOM tree?

At the time, the DOM only uses NamedNodeMaps for Attr's, Entities, and
Notations.

The entities and eotations lists are officially read-only. "The DOM Level 2
does not support editing entities, therefore entities cannot be altered in
any way." (And similar wording for notations.)

As noted previously, the Attr lists are associated with a specific element,
and should have only Attr's inserted in them. Note that the definition of
NamedNodeMap says that it throws INUSE_ATTRIBUTE_ERR if you attempt to
insert an Attr without removing it from its previous context.

 If your code reuses the NamedNodeMap inteface for some other purpose, we
don't specify how it interacts with the standard DOM. I'm not sure we need
to do so...

______________________________________
Joe Kesselman  / IBM Research
Received on Sunday, 5 March 2000 15:06:31 GMT

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