Class ContextItemAccessorFunction.StringAccessor

All Implemented Interfaces:
Callable, FunctionItem, GroundedValue, Item, Sequence
Enclosing class:
ContextItemAccessorFunction

public static class ContextItemAccessorFunction.StringAccessor extends ContextItemAccessorFunction
Subclass of ContextItemAccessorFunction to handle string-length() and normalize-space(). These functions differ by taking string(.) rather than (.) as the implicit argument.
  • Constructor Details

    • StringAccessor

      public StringAccessor()
  • Method Details

    • makeFunctionCall

      public Expression makeFunctionCall(Expression[] arguments)
      Description copied from class: ContextItemAccessorFunction
      Make a static call on this function, with specified arguments.
      Overrides:
      makeFunctionCall in class ContextItemAccessorFunction
      Parameters:
      arguments - the supplied arguments to the function call. This will always be an empty array, since this is a zero-arity function.
      Returns:
      This implementation returns a call on the equivalent arity-1 version of the function, supplying "." as an explicit argument.
    • evaluate

      public GroundedValue evaluate(Item item, XPathContext context) throws XPathException
      Description copied from class: ContextItemAccessorFunction
      Evaluate the function. This is done by creating a function of the same name, with the context item as an explicit argument, and evaluating that.
      Overrides:
      evaluate in class ContextItemAccessorFunction
      Parameters:
      item - the context item
      context - XPath dynamic context (not normally used)
      Returns:
      the result of the function
      Throws:
      XPathException - in the event of a dynamic error