Class FuncPosition
java.lang.Object
org.loboevolution.apache.xpath.Expression
org.loboevolution.apache.xpath.functions.Function
org.loboevolution.apache.xpath.functions.FuncPosition
- All Implemented Interfaces:
SourceLocator
,ExpressionNode
,XPathVisitable
Execute the Position() function.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(XPathContext xctxt) Execute an expression in the XPath runtime context, and return the result of the expression.int
Get the position in the current context node list.void
postCompileStep
(Compiler compiler) This function is currently only being used by Position() and Last().Methods inherited from class org.loboevolution.apache.xpath.functions.Function
callArgVisitors, callVisitors, checkNumberArgs, deepEquals, reportWrongNumberArgs, setArg
Methods inherited from class org.loboevolution.apache.xpath.Expression
asIterator, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
Constructor Details
-
FuncPosition
public FuncPosition()
-
-
Method Details
-
postCompileStep
This function is currently only being used by Position() and Last(). See respective functions for more detail.- Overrides:
postCompileStep
in classFunction
-
getPositionInContextNodeList
Get the position in the current context node list.- Parameters:
xctxt
- Runtime XPath context.- Returns:
- The current position of the iteration in the context node list, or -1 if there is no active context node list.
-
execute
Execute an expression in the XPath runtime context, and return the result of the expression.- Overrides:
execute
in classFunction
- Parameters:
xctxt
- The XPath runtime context.- Returns:
- The result of the expression in the form of a
XObject
. - Throws:
TransformerException
- if a runtime exception occurs.
-