Class ArrayFunctionSet

All Implemented Interfaces:
FunctionLibrary

public class ArrayFunctionSet extends BuiltInFunctionSet
Function signatures (and pointers to implementations) of the functions defined in XPath 3.1
  • Method Details

    • getInstance

      public static ArrayFunctionSet getInstance(int version)
    • getNamespace

      public NamespaceUri getNamespace()
      Description copied from class: BuiltInFunctionSet
      Return the namespace URI for the functions local to this function set.
      Overrides:
      getNamespace in class BuiltInFunctionSet
      Returns:
      the namespace URI of the functions local to this function set. Note that functions imported from another function set may have a different namespace URI.
    • getConventionalPrefix

      public String getConventionalPrefix()
      Description copied from class: BuiltInFunctionSet
      Return a conventional prefix for use with this namespace, typically the prefix used in the documentation of these functions.
      Overrides:
      getConventionalPrefix in class BuiltInFunctionSet
      Returns:
      the string "fn"
    • checkSubscript

      public static int checkSubscript(IntegerValue subscript, int limit) throws XPathException
      Check that a number proposed for use as a subscript is greater than zero and less than the maximum subscript allowed by the implementation (2^31-1), returning the value as a Java int
      Parameters:
      subscript - the proposed subscript (one-based)
      limit - the upper limit allowed (usually the size of the array, sometimes arraysize + 1)
      Returns:
      the proposed subscript as an int, if it is in range (still one-based)
      Throws:
      XPathException - if the subscript is 0, negative, or outside the permitted range