Tree traverse from rejected subtree.

I have a question about the TreeWalker behavior.

I created a DOM tree such as follwing.
And I created a TreeWalker with the NodeFilter and specified
whatToShow as SHOW_ELMWNT | SHOW_CDATA_SECTION.

<doc> -- <eleA> -+- <eleB>(skipped by NodeFilter)  --  {textC}
                 |
                 +- <eleD>(rejected by NodeFilter) --  <[CDATASectionE]>
                 |
                 +- <eleF>(accepted)
                 |
                 +- <eleG>(rejected by NodeFilter) --  <[CDATASectionH]>

  "<..>" means the Element node, "{..}" means the Text node, "<[..]>" means
  CDATASection node.

After I set the TreeWalker.currentNode as <[CDATASectionH]> node,
TreeWalker.previousSibling returns NULL in Xerces C 1.3.0 .

I think the TreeWalker.previousSibling must return <eleF> node,
because DOM L2 PR's TreeWalker Robustness says "The behavior is
as if the Rejected node had only been Skipped" in the last
paragraph.



-----
 KAZUMI Saito  FUJITSU Laboratories Ltd.

Received on Tuesday, 14 November 2000 02:19:51 UTC