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

Robustness of root node in traversal

From: Jonas Sicking <sicking@bigfoot.com>
Date: Sun, 20 May 2001 16:18:37 +0200
Message-ID: <00c501c0e137$c4c883a0$d1ee42d5@kermit>
To: <www-dom@w3.org>
The DOM2 Traversal spec defines very well what should happen if the
currentNode of a nodeIterator or treeWalker is moved in a document or out
from it. However what should happen if the root node is moved in the tree?

The problem applies for the root node of both nodeIterator and treeWalker.
For a nodeIterator the root node is always an ancestor of the current node
so both the root node and currentNode could be left unaffected. However this
requires special handling of currentNode since this is not how it is
normally handled when it's moved out from the tree. Otherwise similar logic
could be applied to the root node as is applied to the currentNode.

For the treeWalker the current node is not neccecairly a decendant of the
rootnode, but it seems to follow the spirit of that interface if rootnode is
unchanged even if moved in the tree.

Any way this needs to be defined.

/ Jonas Sicking
Received on Sunday, 20 May 2001 10:15:51 GMT

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