You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mo...@apache.org on 2001/08/13 12:49:52 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler UnionPathExpr.java
morten 01/08/13 03:49:52
Modified: java/src/org/apache/xalan/xsltc/compiler UnionPathExpr.java
Log:
Added a small fix that orders the expressions inside a union in such a way that
expressions with an attribute axis or attribute node type will be put first.
PR: bugzilla 2921
Obtained from: n/a
Submitted by: morten@apache.org
Reviewed by: morten@apache.org
Revision Changes Path
1.4 +12 -1 xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnionPathExpr.java
Index: UnionPathExpr.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnionPathExpr.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnionPathExpr.java 2001/06/17 12:23:31 1.3
+++ UnionPathExpr.java 2001/08/13 10:49:52 1.4
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: UnionPathExpr.java,v 1.3 2001/06/17 12:23:31 curcuru Exp $
+ * @(#)$Id: UnionPathExpr.java,v 1.4 2001/08/13 10:49:52 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -65,7 +65,10 @@
import java.util.Vector;
+import org.apache.xalan.xsltc.DOM;
+import org.apache.xalan.xsltc.dom.Axis;
import org.apache.xalan.xsltc.compiler.util.Type;
+
import de.fub.bytecode.generic.Instruction;
import de.fub.bytecode.generic.*;
import org.apache.xalan.xsltc.compiler.util.*;
@@ -92,6 +95,14 @@
for (int i = 0; i < size; i++) {
_components[i].setParser(parser);
_components[i].setParent(this);
+ if (_components[i] instanceof Step) {
+ Step step = (Step)_components[i];
+ if ((step.getAxis() == Axis.ATTRIBUTE) ||
+ (step.getNodeType() == DOM.ATTRIBUTE)) {
+ _components[i] = _components[0];
+ _components[0] = step;
+ }
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org