You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@apache.org on 2001/04/11 17:21:48 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/functions FuncCurrent.java
mmidy 01/04/11 08:21:48
Modified: java/src/org/apache/xpath/functions FuncCurrent.java
Log:
Don't assume that the object returned by getSubContextList() is a PredicatedNodeTest object.
Revision Changes Path
1.6 +5 -3 xml-xalan/java/src/org/apache/xpath/functions/FuncCurrent.java
Index: FuncCurrent.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncCurrent.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FuncCurrent.java 2000/12/18 08:50:13 1.5
+++ FuncCurrent.java 2001/04/11 15:21:47 1.6
@@ -70,6 +70,7 @@
import org.apache.xpath.axes.PredicatedNodeTest;
import org.apache.xpath.axes.LocPathIterator;
import org.apache.xpath.axes.ContextNodeList;
+import org.apache.xpath.axes.SubContextList;
/**
* <meta name="usage" content="advanced"/>
@@ -105,12 +106,13 @@
{
// If we're in a predicate, then this will return non-null.
- PredicatedNodeTest iter = (PredicatedNodeTest) xctxt.getSubContextList();
+ // PredicatedNodeTest iter = (PredicatedNodeTest) xctxt.getSubContextList();
+ SubContextList iter = xctxt.getSubContextList();
Node currentNode;
- if (null != iter)
+ if (null != iter && iter instanceof PredicatedNodeTest)
{
- LocPathIterator lpi = iter.getLocPathIterator();
+ LocPathIterator lpi = ((PredicatedNodeTest)iter).getLocPathIterator();
currentNode = lpi.getCurrentContextNode();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org