Class LoadXqueryModule

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

    public class LoadXqueryModule
    extends SystemFunction
    implements Callable
    This class implements the function load-xquery-module(), which is a standard function in XPath 3.1. It is classified as a higher-order function and therefore requires Saxon-PE or higher.
    • Constructor Detail

      • LoadXqueryModule

        public LoadXqueryModule()
    • Method Detail

      • makeNewContext

        public XPathContext makeNewContext​(XPathContext callingContext,
                                           ContextOriginator originator)
        Prepare an XPathContext object for evaluating the function
        Specified by:
        makeNewContext in interface FunctionItem
        Overrides:
        makeNewContext in class AbstractFunction
        Parameters:
        callingContext - the XPathContext of the function calling expression
        originator - identifies the location of the caller for diagnostics
        Returns:
        a suitable context for evaluating the function (which may or may not be the same as the caller's context)
      • call

        public MapItem call​(XPathContext context,
                            Sequence[] args)
                     throws XPathException
        Invoke the function
        Specified by:
        call in interface Callable
        Parameters:
        context - the XPath dynamic evaluation context
        args - the actual arguments to be supplied
        Returns:
        the result of invoking the function
        Throws:
        XPathException - if a dynamic error occurs within the function