Re: Implementing NodeList

"Don Park" <donpark@quake.net> writes:

> This confusion stems from the movement of words between different versions
> of the spec.  If you read the latest spec more carefully, you will see that
> the word "live" is used only in the description of the attribute
> "childNodes".  This means that the NodeList itself is not always live and
> that the NodeList returned by getElementsByTagName is not live.  Only the
> NodeList returned by getChildNodes is "live".
> 
> Does this help?

Yes.  It matches our interpretation of the spec two versions ago, and and is
trivial (though not particularly efficient) to implement.  Somehow, in the
transition betweem versions, the wording drifted to the point where it could
be interpreted with unintended broadness.  

There was a lot less inefficiency in the implementation when there were
iterators; each implementation of the NodeList interface could return the
most appropriate implementation of Iterator.  I hope they return soon.

-- 
 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 18:33:40 UTC