org.apache.xpath.functions

Class FuncLast

public class FuncLast extends Function

Execute the Last() function.

UNKNOWN: advanced

Method Summary
XObjectexecute(XPathContext xctxt)
Execute the function.
voidfixupVariables(Vector vars, int globalsSize)
No arguments to process, so this does nothing.
intgetCountOfContextNodeList(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.

getCountOfContextNodeList

public int getCountOfContextNodeList(XPathContext xctxt)
Get the position in the current context node list.

Parameters: xctxt non-null reference to XPath runtime context.

Returns: The number of nodes in the list.

Throws: javax.xml.transform.TransformerException

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 B) 2005 Apache XML Project. All Rights Reserved.