Package org.htmlunit.xpath.functions
Class FuncPosition
- java.lang.Object
-
- org.htmlunit.xpath.Expression
-
- org.htmlunit.xpath.functions.Function
-
- org.htmlunit.xpath.functions.FuncPosition
-
- All Implemented Interfaces:
javax.xml.transform.SourceLocator
,ExpressionNode
,XPathVisitable
public class FuncPosition extends Function
Execute the Position() function.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
m_isTopLevel
-
Constructor Summary
Constructors Constructor Description FuncPosition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XObject
execute(XPathContext xctxt)
Execute an expression in the XPath runtime context, and return the result of the expression.int
getPositionInContextNodeList(XPathContext xctxt)
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.htmlunit.xpath.functions.Function
callArgVisitors, callVisitors, checkNumberArgs, deepEquals, reportWrongNumberArgs, setArg
-
Methods inherited from class org.htmlunit.xpath.Expression
asIterator, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
-
-
-
Method Detail
-
postCompileStep
public void postCompileStep(Compiler compiler)
This function is currently only being used by Position() and Last(). See respective functions for more detail.- Overrides:
postCompileStep
in classFunction
-
getPositionInContextNodeList
public int getPositionInContextNodeList(XPathContext xctxt)
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
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
Execute an expression in the XPath runtime context, and return the result of the expression.
-
-