W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Re: Traversal?

From: <keshlam@us.ibm.com>
Date: Thu, 22 Jun 2000 19:18:53 -0400
To: Lars Marius Garshol <larsga@garshol.priv.no>
cc: www-dom@w3.org
Message-ID: <85256906.008012B2.00@D51MTA03.pok.ibm.com>
>What sort of uses are envisioned for the traversal module of the DOM

1) General iterative navigation, so each user doesn't have to recreate all
the filtered tree-walk code which forms the basis of so much XML

2) Traversal _was_ originally designed to be the output datatype from a
search. (The original name of this chapter was "Queries, Iterators, and
Filtering") But we're waiting for the XML Query Working Group to define the
semantics of searching XML before we attempt to provide an API for that

3) Some DOMs may be able to recognize certain filters and perform the
filtering in a more efficient manner.

>Is the intention to support processing application that extract
>information from the DOM for conversion or other purposes? Or is the
>intention to be able to reuse these interfaces in other contexts

Yes. Or to support applications that find all instances of particular
patterns and change them; one of our standard usecases during design was
something that went through an HTML document looking for certain patterns
and wrapped a color change around them to make them more visible in the

> I've read through this several time and even briefly tried using
>it, but can't really see much use for it.

If your XML documents are sufficiently simple in structure and processing,
you may never need iterators, never mind filtered iteration.  If you ever
use getElementsByTagName(), you can think of iterators and tree-walkers as
a much more powerful version of that -- and one that avoids some of the
performance pitfalls built into NodeList.
Joe Kesselman  / IBM Research
Received on Thursday, 22 June 2000 19:19:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC