org.apache.xpath.functions

Class FuncPosition

public class FuncPosition extends Function

Execute the Position() function.

UNKNOWN: advanced

Method Summary
XObjectexecute(XPathContext xctxt)
Execute the function.
voidfixupVariables(Vector vars, int globalsSize)
No arguments to process, so this does nothing.
intgetPositionInContextNodeList(XPathContext xctxt)
Get the position in the current context node list.
voidpostCompileStep(Compiler compiler)
Figure out if we're executing a toplevel expression.

Method Detail

execute

public XObject execute(XPathContext xctxt)
Execute the function. The function must return a valid object.

Parameters: xctxt The current execution context.

Returns: A valid XObject.

Throws: javax.xml.transform.TransformerException

fixupVariables

public void fixupVariables(Vector vars, int globalsSize)
No arguments to process, so this does nothing.

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 itteration in the context node list, or -1 if there is no active context node list.

postCompileStep

public void postCompileStep(Compiler compiler)
Figure out if we're executing a toplevel expression. If so, we can't be inside of a predicate.
Copyright © 2005 Apache XML Project. All Rights Reserved.