Function
public class PositionFunction extends java.lang.Object implements Function
4.1 number position()
The position function returns a number equal to the context position from the expression evaluation context.
Constructor | Description |
---|---|
PositionFunction() |
Create a new
PositionFunction object. |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
call(Context context,
java.util.List args) |
Returns the position of the context node in the context node-set.
|
static java.lang.Double |
evaluate(Context context) |
Returns the position of the context node in the context node-set.
|
public PositionFunction()
PositionFunction
object.public java.lang.Object call(Context context, java.util.List args) throws FunctionCallException
call
in interface Function
context
- the context at the point in the
expression where the function is calledargs
- an empty listDouble
containing the context positionFunctionCallException
- if args
is not emptyContext.getSize()
public static java.lang.Double evaluate(Context context)
context
- the context at the point in the
expression where the function is calledDouble
containing the context positionContext.getPosition()
Copyright © 2001–2018 Codehaus. All rights reserved.