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

Re: TreeWalker.whatToShow

From: Dieter Köhler <dieter.koehler@ppp.uni-bamberg.de>
Date: Sat, 26 Feb 2000 14:10:35 +0100
Message-ID: <38B7D0CB.CCD7774F@ppp.uni-bamberg.de>
To: "www-dom@w3.org" <www-dom@w3.org>
keshlam@us.ibm.com wrote:
> 
> > There is a similar (or may be worse) problem in 7.1.2.4.:  Should that
> > paragraph then read: "... If a node is skiped by the active whatToShow
> > flags, a Filter will not be called to evaluate that node. ..."?
> 
> Yes, for performance reasons -- and performance is the reason whatToShow
> exists at all. Here's the lastest revision of that paragraph:
> 

Thank you for posting the revision of the paragraph.  Nevertheless the
solution it suggests does not satisfy me.  In my opinion the case it
is suitable for is the simple NodeIterator, which treats rejecting and
skipping alike even in using filters.  If one wants a simple and fast
implementation of scanning through a document it would be an
appropriate methode to use such a NodeIterator.  In that case, using a
whatToShow flag or a filter on a node can only have similar results:
accepting or skipping the node.  Therefore it would not be necessary
to call a filter when the whatToShow flag says: "Skip!"

But when one prefers using a TreeWalker in her program instead of a
NodeIterator she is in one or another respect interested in either a
tree like navigation or in rejecting some branches of the tree.  If
whatToShow exists in TreeWalkers for the reason of performance, it
would be best, if it supports rejecting a hole branche of the tree.  I
hardly can imaging a case were a "skipping-behaviour" of a whatToShow
flag is needed and the solution enforces a TreeWalker and not a
NodeIterator.

And finally, a suggestion for an additional attribute for the
NodeIterator and TreeWalker interface:
    filtered of type boolean
        The value of this flag determines whether the filter used 
        to screen nodes is activated or deactivated.

-- 
=====================================================================
 Dieter Koehler, M. A. - dieter.koehler@ppp.uni-bamberg.de
 Mittlere Kaulberg 22, D-96049 Bamberg, +49(0)951-5190726
 "http://www.philo.de/Philosophie-Seiten/": 1000+ Philosophie-Links
 "http://www.philo.de/VirtualLibrary/14.de.htm": Deutsche Philo-Links
 "http://www.philo.de/xml/": Open XML - XML-Komponenten fuer Delphi
=====================================================================
Received on Saturday, 26 February 2000 08:11:51 GMT

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