Re: Implementing NodeList

keshlam@us.ibm.com writes:

>      Its simpler than it seems.  Each insertion or removal involves
>      incrementing
>      or decrementing the index by one.
> 
> That's not quite so simple, unless I'm missing something.

I _hope_ that what you're missing is that one only has to renumber the nodes
in a nodelist if they are all siblings.  Our implementation of a NodeList
simply refers to the parent and the renumbering happens automatically.

Actually, we have _two_ implementations of the NodeList interface:
ChildNodeList, which contains the children of a single Node, and
ArrayNodeList, which is an array of potentially unrelated nodes.  Only the
former is ``live''.  

It would be useful if the specification reflected this distinction.  It's
extremely useful to have both ``live'' and ``dead'' (or at least,
flash-frozen) collections of nodes. 

-- 
 Stephen R. Savitzky   Chief Software Scientist, Ricoh Silicon Valley, Inc., 
<steve@rsv.ricoh.com>                            California Research Center
 voice: 650.496.5710   fax: 650.854.8740    URL: http://rsv.ricoh.com/~steve/
  home: <steve@starport.com> URL: http://www.starport.com/people/steve/

Received on Monday, 27 July 1998 17:33:49 UTC