grchiu 2003/07/02 13:50:46
Modified: java/src/org/apache/xpath/axes UnionChildIterator.java
Log:
Patch for bugzilla 20909.
Need to fix-up variables for PredicatedNodeTest sub-iterators in
UnionChildIterator. Variables in the m_nodeTests expressions were not
'fixed up'.
Revision Changes Path
1.4 +20 -0 xml-xalan/java/src/org/apache/xpath/axes/UnionChildIterator.java
Index: UnionChildIterator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/axes/UnionChildIterator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnionChildIterator.java 27 Jan 2003 18:45:23 -0000 1.3
+++ UnionChildIterator.java 2 Jul 2003 20:50:46 -0000 1.4
@@ -117,6 +117,26 @@
}
/**
+ * This function is used to fixup variables from QNames to stack frame
+ * indexes at stylesheet build time.
+ * @param vars List of QNames that correspond to variables. This list
+ * should be searched backwards for the first qualified name that
+ * corresponds to the variable reference qname. The position of the
+ * QName in the vector from the start of the vector will be its position
+ * in the stack frame (but variables above the globalsTop value will need
+ * to be offset to the current stack frame).
+ */
+ public void fixupVariables(java.util.Vector vars, int globalsSize)
+ {
+ super.fixupVariables(vars, globalsSize);
+ if (m_nodeTests != null) {
+ for (int i = 0; i < m_nodeTests.length; i++) {
+ m_nodeTests[i].fixupVariables(vars, globalsSize);
+ }
+ }
+ }
+
+ /**
* Test whether a specified node is visible in the logical view of a
* TreeWalker or NodeIterator. This function will be called by the
* implementation of TreeWalker and NodeIterator; it is not intended to
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]