Robustness of root node in traversal

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 UTC