W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

RE: NamedNodeMap

From: Fred L. Drake, Jr. <fdrake@acm.org>
Date: Wed, 11 Jul 2001 16:21:56 -0400 (EDT)
Message-ID: <15180.46436.801672.140346@cj42289-a.reston1.va.home.com>
To: "Allen, Michael B (RSCH)" <Michael_B_Allen@ml.com>
Cc: www-dom@w3c.org

Allen, Michael B (RSCH) writes:
 > However, I have a new question. Imagine a NodeList is returned by
 > getElementsByTagName. Then a Node in the DOM tree is modified
 > (e.g. replaced, removed, etc). Will these changes be reflected in
 > the NodeList returned by getElementsByTagName? If so this requires

  This is the only interpretation I've ever heard, and I've heard
little but griping about it.  For most purposes, a fairly static
NodeList is sufficient; for NodeList objects used to implement the
childNodes attribute, there's not much of a problem, but the
getElementsByTagName() and getElementsByTagNameNS() return values are
problematic.  My own DOM implementation is non-conforming in this
regard, and I haven't heard any complaints from the users.
  I don't think the liveness requirement is described very carefully;
if I have a node that I remove from the tree, and then add to another
location, should the node be included in any NodeList objects returned
from getElementsByTagName()?  It's still "owned" by the document, and
I may well stick it back in the tree somewhere.  I'm sure this is
covered somewhere, but this kind of thing ends up being a sticking
point for me.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations
Received on Wednesday, 11 July 2001 16:23:56 GMT

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