Re: NamedNodeMap

>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

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 UTC