Class ArrayFunctionSet.ArrayFromSequence

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

public static class ArrayFunctionSet.ArrayFromSequence extends FoldingFunction implements Pingable
Implementation of the function array:_from-sequence(item()*) => array(*) which is used internally for the implementation of array{} and of the saxon:array extension
  • Constructor Details

    • ArrayFromSequence

      public ArrayFromSequence()
  • Method Details

    • ping

      public void ping()
      Callback function, invoked when a SimpleArrayItem created by this function needs to be converted to an ImmutableArrayItem
      Specified by:
      ping in interface Pingable
    • call

      public ArrayItem call(XPathContext context, Sequence[] arguments) throws XPathException
      Description copied from class: FoldingFunction
      Evaluate the expression
      Specified by:
      call in interface Callable
      Overrides:
      call in class FoldingFunction
      Parameters:
      context - the dynamic evaluation context
      arguments - the values of the arguments, supplied as Sequences
      Returns:
      the result of the evaluation, in the form of a Sequence
      Throws:
      XPathException - if a dynamic error occurs during the evaluation of the expression
    • getFold

      public Fold getFold(XPathContext context, Sequence... additionalArguments)
      Create the Fold object which is used to perform a streamed evaluation
      Specified by:
      getFold in class FoldingFunction
      Parameters:
      context - the dynamic evaluation context
      additionalArguments - the values of all arguments other than the first.
      Returns:
      the Fold object used to compute the function