Class CollectionFn

All Implemented Interfaces:
Callable, FunctionItem, GroundedValue, Item, Sequence

public class CollectionFn extends SystemFunction implements Callable
Implement the fn:collection() function. This is responsible for calling the registered CollectionFinder. For the effect of the default system-supplied CollectionFinder, see StandardCollectionFinder
  • Field Details

    • EMPTY_COLLECTION_URI

      public static String EMPTY_COLLECTION_URI
      URI representing a collection that is always empty, regardless of any collection URI resolver
    • EMPTY_COLLECTION

      public static final ResourceCollection EMPTY_COLLECTION
      An empty collection
  • Constructor Details

    • CollectionFn

      public CollectionFn()
  • Method Details

    • getSpecialProperties

      public int getSpecialProperties(Expression[] arguments)
      Description copied from class: SystemFunction
      Determine the special properties of this function. The general rule is that a system function call is non-creative unless more details are defined in a subclass.
      Overrides:
      getSpecialProperties in class SystemFunction
      Parameters:
      arguments - the actual arguments supplied in a call to the function
      Returns:
      the properties
    • getAbsoluteCollectionURI

      public static String getAbsoluteCollectionURI(String baseUri, String href, XPathContext context) throws XPathException
      Throws:
      XPathException
    • call

      public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
      Dynamic call on collection() function
      Specified by:
      call in interface Callable
      Parameters:
      context - the dynamic evaluation context
      arguments - the values of the arguments, supplied as Sequences.
      Returns:
      the sequence of nodes forming the collection
      Throws:
      XPathException - if a dynamic error occurs