Re: TreeWalker.whatToShow

> 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:



7.1.2.4. Filters and whatToShow flags

Iterator and TreeWalker apply whatToShow flags before applying Filters. If
a node is skipped by the active whatToShow flags, a Filter will not be
called to evaluate that node. Please note that this behavior is similar to
that of FILTER_SKIP; children of that node will be considered, and Filters
may be called to evaluate them. Also note that it will in fact be a "skip"
even if the Filter
would have preferred to reject the entire subtree; if this would cause a
problem in your application, consider setting whatToShow to SHOW_ALL and
performing the nodeType test inside your filter.


______________________________________
Joe Kesselman  / IBM Research

Received on Friday, 25 February 2000 10:09:34 UTC