You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by tm...@apache.org on 2001/08/13 19:35:48 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup
tmiller 01/08/13 10:35:48
Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
Log:
bug 2553, fixes AbbreviatedAbsoluteLocationPath,
some relative location paths still give duplicates, will need to filter.
Revision Changes Path
1.6 +14 -4 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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- xpath.cup 2001/08/07 10:38:44 1.5
+++ xpath.cup 2001/08/13 17:35:48 1.6
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: xpath.cup,v 1.5 2001/08/07 10:38:44 morten Exp $
+ * @(#)$Id: xpath.cup,v 1.6 2001/08/13 17:35:48 tmiller Exp $
*
* Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
*
@@ -477,9 +477,19 @@
AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath:rlp
{:
- // transform rlp
- ((RelativeLocationPath) rlp).setAxis(Axis.DESCENDANT);
- RESULT = new AbsoluteLocationPath(rlp);
+ // GTM bug fix 2553. Still need to filter dups from list
+ // Try to get node type and axis from the RelativeLocationPath
+ int nodeType = NodeTest.ELEMENT;
+ int axis = Axis.CHILD;
+ if (rlp instanceof Step) {
+ nodeType = ((Step)rlp).getNodeType();
+ axis = ((Step)rlp).getAxis();
+ }
+ // create the new abs location path
+ Step nodeStep1 = new Step(Axis.DESCENDANTORSELF, -1, null);
+ Step nodeStep2 = new Step(axis, nodeType, null);
+ RESULT = new AbsoluteLocationPath(new ParentLocationPath(
+ nodeStep1, nodeStep2));
:};
Step ::= NodeTest:ntest
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org