- 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
>What sort of uses are envisioned for the traversal module of the DOM >L2? 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 processing. 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 operation. 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 >later? 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 document. > 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