W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1999

Re: Comment on DOM Level 2 § 6.1.3.

From: Dieter Köhler <dkoehler@ix.urz.uni-heidelberg.de>
Date: Fri, 03 Sep 1999 17:17:03 +0200
Message-ID: <37CFE66F.15F735F4@ix.urz.uni-heidelberg.de>
To: "www-dom@w3.org" <www-dom@w3.org>
> Applying this notion to Dieter Köhler's example below, parentNode
> returns 'A'.
> Any comments?

It seems to me a more natural behaviour when any in some way critical
modification of the DOM-tree is answered by invalidating the Treewalker
or by re-initializing it (setting it to 'root' or to the node "above"
the modification), because otherwise the TreeWalker.current is working
in a branch of the tree that "normally" would have been ignored.  So a
TreeWalker must allways pay attention to modifications that appear
between (including) the 'root' and the 'current' node, and not only to
those immediately before or behind the 'current' node.  The problem is
then: How should that be implemented? By events? By visitors?

For reasons of performance I would suggest adding a flag to the
TreeWalker interface which specifies whether at all the TreeWalker keeps
an eye on modifications.  If one knows, that her application needs a
TreeWalker only to traverse a stable DOM tree or that the TreeWalker is
not affected by potential modifications then she can use this flag to
increase the performance of the application.

Note on my posting "Comment on DOM 2", date Wed, 01 Sep 1999, section
'COMMENT ON § 6.2. b'": Instead of "What about a LastNode and a
PreviousNode method?" read "What about a LastNode method?"

 Dieter Koehler, M. A. - dkoehler@ix.urz.uni-heidelberg.de
 Huehnerstein 1, D-69121 Heidelberg, +49(0)6221-474359
 "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 Friday, 3 September 1999 11:17:10 UTC

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