All Implemented Interfaces:
SourceLocator, ExpressionNode, XPathVisitable

public class FuncLast extends Function
Execute the Last() function.
  • Constructor Details

    • FuncLast

      public FuncLast()
  • Method Details

    • 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 class Function
    • getCountOfContextNodeList

      public int getCountOfContextNodeList(XPathContext xctxt) throws TransformerException
      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:
      TransformerException - in case of error
    • execute

      public XObject execute(XPathContext xctxt) throws TransformerException
      Execute an expression in the XPath runtime context, and return the result of the expression.
      Overrides:
      execute in class Function
      Parameters:
      xctxt - The XPath runtime context.
      Returns:
      The result of the expression in the form of a XObject.
      Throws:
      TransformerException - if a runtime exception occurs.