tmiller 01/09/10 07:41:24
Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
Log:
bug fix 3360, predicate handling added
Revision Changes Path
1.13 +7 -5 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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- xpath.cup 2001/09/07 11:55:53 1.12
+++ xpath.cup 2001/09/10 14:41:24 1.13
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: xpath.cup,v 1.12 2001/09/07 11:55:53 tmiller Exp $
+ * @(#)$Id: xpath.cup,v 1.13 2001/09/10 14:41:24 tmiller Exp $
*
* Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
*
@@ -478,26 +478,28 @@
AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath:rlp
{:
- // GTM bug fix 2553.
+ // GTM bug fix 2553; 3360 (handles predicates in nodeStep2).
// Try to get node type and axis from the RelativeLocationPath
int nodeType = NodeTest.ELEMENT;
int axis = Axis.CHILD;
+ Vector predicates = null;
if (rlp instanceof Step) {
nodeType = ((Step)rlp).getNodeType();
axis = ((Step)rlp).getAxis();
+ predicates = ((Step)rlp).getPredicates();
}
// create the new abs location path
Step nodeStep1 = new Step(Axis.DESCENDANTORSELF, -1, null);
- Step nodeStep2 = new Step(axis, nodeType, null);
+ //Step nodeStep2 = new Step(axis, nodeType, null);
+ Step nodeStep2 = new Step(axis, nodeType, predicates);
AbsoluteLocationPath path = new AbsoluteLocationPath(
- new ParentLocationPath(nodeStep1, nodeStep2));
+ new ParentLocationPath(nodeStep1, nodeStep2));
// uncomment for no dup filtering. Used in debugging.
//RESULT = path;
// Filtered the Abs Loc Path to remove dups
RESULT = new FilteredAbsoluteLocationPath(path);
-
:};
Step ::= NodeTest:ntest
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]