morten 01/09/26 05:42:13
Modified: java/src/org/apache/xalan/xsltc/compiler Step.java
Log:
Added node-ordering for preceding iterators when used in apply-templates
or value-of elements.
PR: bugzilla 3463
Obtained from: n/a
Submitted by: [EMAIL PROTECTED]
Reviewed by: [EMAIL PROTECTED]
Revision Changes Path
1.14 +7 -10
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java
Index: Step.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Step.java 2001/09/26 12:19:43 1.13
+++ Step.java 2001/09/26 12:42:13 1.14
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: Step.java,v 1.13 2001/09/26 12:19:43 morten Exp $
+ * @(#)$Id: Step.java,v 1.14 2001/09/26 12:42:13 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -339,10 +339,8 @@
// Now, for reverse iterators we may need to re-arrange the
// node ordering (ancestor-type iterators).
- if (!(getParent() instanceof ForEach)) {
- if ((!hasParent()) && (!_hadPredicates))
- orderIterator(classGen, methodGen);
- }
+ if (!(getParent() instanceof ForEach) && (!hasParent()))
+ orderIterator(classGen, methodGen);
break;
}
}
@@ -464,16 +462,15 @@
/*
* Order nodes for iterators with reverse axis
- *
- * Should be done for preceding and preceding-sibling axis as well,
- * but our iterators for those axis are not reverse (as they should)
*/
public void orderIterator(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
-
- if ((_axis == Axis.ANCESTOR) || (_axis == Axis.ANCESTORORSELF)) {
+ if ((_axis == Axis.ANCESTOR) ||
+ (_axis == Axis.ANCESTORORSELF) ||
+ (_axis == Axis.PRECEDING)) {
+ System.err.println("HERE!");
final int init = cpg.addMethodref(REVERSE_ITERATOR, "<init>",
"("+NODE_ITERATOR_SIG+")V");
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]