Class FunctionPattern

All Implemented Interfaces:
SourceLocator, SubContextList, ExpressionNode, XPathVisitable

public class FunctionPattern extends StepPattern
Match pattern step that contains a function.
  • Constructor Details

    • FunctionPattern

      public FunctionPattern(Expression expr, int axis)
      Construct a FunctionPattern from a expression.

      NEEDSDOC @param expr

  • Method Details

    • calcScore

      public final void calcScore()
      Static calc of match score.
      Overrides:
      calcScore in class StepPattern
    • execute

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

      public XObject execute(XPathContext xctxt, int ctx, DTM dtm, int expType) throws TransformerException
      Execute an expression in the XPath runtime context, and return the result of the expression.
      Overrides:
      execute in class StepPattern
      Parameters:
      xctxt - The XPath runtime context.
      ctx - The currentNode.
      dtm - The DTM of the current node.
      expType - The expanded type ID of the current node.
      Returns:
      The result of the expression in the form of a XObject.
      Throws:
      TransformerException - if a runtime exception occurs.
    • 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 StepPattern
      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.
    • callSubtreeVisitors

      protected void callSubtreeVisitors(XPathVisitor visitor)
      Call the visitors on the subtree. Factored out from callVisitors so it may be called by derived classes.
      Overrides:
      callSubtreeVisitors in class StepPattern