com.novell.xml.xpath.functions
Class xpathPosition

java.lang.Object
  extended bycom.novell.xml.xpath.Function
      extended bycom.novell.xml.xpath.functions.xpathPosition

public class xpathPosition
extends Function

This class implements the XPath position() built-in function


Constructor Summary
xpathPosition()
          Construct an object for the position() function
 
Method Summary
 ExpressionValue invoke(Object[] args)
          Perform position() function
 NumberValue position(Node contextNode, ExpressionContext context)
          Perform position() function
 String toString()
          Return function name.
 
Methods inherited from class com.novell.xml.xpath.Function
getInstance, getSignature, isConstant, registerForReset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

xpathPosition

public xpathPosition()
Construct an object for the position() function

Method Detail

invoke

public ExpressionValue invoke(Object[] args)
                       throws XPathEvaluationException
Perform position() function

Overrides:
invoke in class Function
Parameters:
args - List of arguments. First first argument must be the context node. The second argument must be the expression context object
Returns:
A number indicating the position of the context node in the context node list
Throws:
XPathEvaluationException

position

public NumberValue position(Node contextNode,
                            ExpressionContext context)
Perform position() function

Parameters:
contextNode - Node whose position is desired
context - Context node list

toString

public String toString()
Return function name.

Returns:
Function name.