You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by ga...@locus.apache.org on 2000/12/02 03:18:58 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/axes PrecedingWalker.java
garyp 00/12/01 18:18:58
Modified: java/src/org/apache/xpath/axes PrecedingWalker.java
Log:
Fix bug where Walker root was an attribute or namespace node.
Revision Changes Path
1.4 +5 -1 xml-xalan/java/src/org/apache/xpath/axes/PrecedingWalker.java
Index: PrecedingWalker.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/PrecedingWalker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PrecedingWalker.java 2000/11/13 16:27:30 1.3
+++ PrecedingWalker.java 2000/12/02 02:18:58 1.4
@@ -85,12 +85,16 @@
}
/**
- * Set the root node of the TreeWalker.
+ * Set the root node of the TreeWalker. If we follow an attribute:: or namespace::
+ * axis, we operate relative to the parent node.
*
* NEEDSDOC @param root
*/
public void setRoot(Node root)
{
+
+ if (Node.ATTRIBUTE_NODE == root.getNodeType())
+ root = root.getParentNode();
super.setRoot(root);