You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by rp...@locus.apache.org on 2000/01/05 22:24:43 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/dom/traversal TreeWalkerImpl.java
rpfeiffe 00/01/05 13:24:42
Modified: java/src/org/apache/xerces/dom/traversal TreeWalkerImpl.java
Log:
Bug:
previousNode (would only go down to the
last child of the previous sibling).
Fix:
Now it properly iterates downward through the l
ast children.
Thanks to:
Michel Benhamou <bm...@club-internet.fr>
for finding the bug and giving the fix.
-rip
Revision Changes Path
1.2 +8 -0 xml-xerces/java/src/org/apache/xerces/dom/traversal/TreeWalkerImpl.java
Index: TreeWalkerImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/traversal/TreeWalkerImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TreeWalkerImpl.java 1999/11/09 01:13:33 1.1
+++ TreeWalkerImpl.java 2000/01/05 21:24:42 1.2
@@ -222,6 +222,14 @@
// get the lastChild of result.
Node lastChild = getLastChild(result);
+ Node prev = lastChild ;
+ while (lastChild != null) {
+ prev = lastChild ;
+ lastChild = getLastChild(prev) ;
+ }
+
+ lastChild = prev ;
+
// if there is a lastChild which passes filters return it.
if (lastChild != null) {
fCurrentNode = lastChild;