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

Re: Level 2 iterators

From: Ray Whitmer <ray@imall.com>
Date: Fri, 05 Mar 1999 14:09:08 -0700
Message-ID: <36E047F4.5DF6D596@imall.com>
To: John Cowan <cowan@locke.ccil.org>
CC: DOM List <www-dom@w3.org>
John Cowan wrote:

> Ray Whitmer wrote:
>
> > > > NodeIterator, on the other hand, has no caching issues, because it only
> > > > visits each node once.
> > >
> > > Not necessarily!
>
> [snip]
>
> > Could you point me to a part of the spec which you feel states that any node
> > would only ever be visited once?
>
> No.  I was merely taking issue with your claim that NodeIterators
> necessarily visit nodes only once.
>
> Indeed, there is no guarantee that iterators terminate.

Caching is irrelevant because NodeList-style multiple visits to the same position
in the result set is impossible.

But nit picking, yes, the same node can appear at multiple locations in the result
set -- even without document mutation if your iteration did not follow document
order.

Ray Whitmer
Received on Friday, 5 March 1999 16:09:32 GMT

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