morten 01/10/08 02:50:28
Modified: java/src/org/apache/xalan/xsltc/compiler Step.java xpath.cup
Log:
Fixed ordering of some node sets.
PR: bugzilla 3816
Obtained from: n/a
Submitted by: [EMAIL PROTECTED]
Reviewed by: [EMAIL PROTECTED]
Revision Changes Path
1.20 +5 -6
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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Step.java 2001/10/08 07:47:59 1.19
+++ Step.java 2001/10/08 09:50:28 1.20
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: Step.java,v 1.19 2001/10/08 07:47:59 morten Exp $
+ * @(#)$Id: Step.java,v 1.20 2001/10/08 09:50:28 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -376,13 +376,10 @@
il.append(new PUSH(cpg, _axis));
il.append(new PUSH(cpg, _nodeType));
il.append(new INVOKEINTERFACE(ty, 3));
-
- // Now, for reverse iterators we may need to re-arrange the
- // node ordering (ancestor-type iterators).
- if (reverseNodeSet())
- orderIterator(classGen, methodGen);
+ //orderIterator(classGen, methodGen);
break;
}
+
}
}
@@ -513,6 +510,8 @@
*/
public void orderIterator(ClassGenerator classGen,
MethodGenerator methodGen) {
+ if (!reverseNodeSet()) return;
+
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
final int init = cpg.addMethodref(REVERSE_ITERATOR, "<init>",
1.19 +6 -1
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup
Index: xpath.cup
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- xpath.cup 2001/10/08 07:47:59 1.18
+++ xpath.cup 2001/10/08 09:50:28 1.19
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: xpath.cup,v 1.18 2001/10/08 07:47:59 morten Exp $
+ * @(#)$Id: xpath.cup,v 1.19 2001/10/08 09:50:28 morten Exp $
*
* Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
*
@@ -473,9 +473,14 @@
// Expand 'rlp//step' into 'rlp/descendant-or-self::node()/step'
nodeStep = new Step(Axis.DESCENDANTORSELF,
NodeTest.ANODE, null);
+ /*
RESULT = new ParentLocationPath(
new ParentLocationPath((RelativeLocationPath) rlp,
nodeStep), step);
+ */
+ RESULT = new ParentLocationPath((RelativeLocationPath)rlp,
+ new ParentLocationPath(nodeStep, step));
+
}
:};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]