com.ibm.xml.xapi

Interface XQueryExecutable

  • All Superinterfaces:
    XExecutable


    public interface XQueryExecutable
    extends XExecutable

    Represents a prepared XQuery expression.

    Parameters to the execute methods include:

    • Either a JAXP Source object or an XItemView object for the initial context item. Valid Source types are:
      • StreamSource
      • SAXSource
      • DOMSource
      • StAXSource
    • An XDynamicContext object containing the execution-time settings. If none is provided the default settings are used.
    • A JAXP Result object to serialize the result to. Valid Result types are:
      • StreamResult
      • SAXResult
      • DOMResult
      • StAXResult

    All XQueryExecutable objects are thread safe.

    See Also:
    XDynamicContext, XItemView, XExecutable
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void execute(javax.xml.transform.Result result)
      Execute for no source, sending the output to the specified result.
      void execute(javax.xml.transform.Source source, javax.xml.transform.Result result)
      Execute for the given source, sending the output to the specified result.
      void execute(javax.xml.transform.Source source, XDynamicContext dynamicContext, javax.xml.transform.Result result)
      Execute for the given source and dynamic context, sending the output to the specified result.
      void execute(XDynamicContext dynamicContext, javax.xml.transform.Result result)
      Execute for no source, sending the output to the specified result.
      void execute(XItemView item, javax.xml.transform.Result result)
      Execute for the given item, sending the output to the specified result.
      void execute(XItemView item, XDynamicContext dynamicContext, javax.xml.transform.Result result)
      Execute for the given item and dynamic context, sending the output to the specified result.
      void registerImportedSchemas()
      Registers any schemas that the query imports using import schema declarations with the XFactory that created this XQueryExecutable instance.
    • Method Detail

      • execute

        void execute(javax.xml.transform.Source source,
                   javax.xml.transform.Result result)
        Execute for the given source, sending the output to the specified result. The default dynamic context settings are used.
        Parameters:
        source - The input source. May be null however if the query accesses the context item an error will be raised.
        result - The target result.
      • execute

        void execute(javax.xml.transform.Source source,
                   XDynamicContext dynamicContext,
                   javax.xml.transform.Result result)
        Execute for the given source and dynamic context, sending the output to the specified result.
        Parameters:
        source - The input source. May be null however if the query accesses the context item an error will be raised.
        dynamicContext - The dynamic context.
        result - The target result.
      • execute

        void execute(XItemView item,
                   javax.xml.transform.Result result)
        Execute for the given item, sending the output to the specified result. The default dynamic context settings are used.
        Parameters:
        item - The context item. May be null however if the query accesses the context item an error will be raised.
        result - The target result.
      • execute

        void execute(XItemView item,
                   XDynamicContext dynamicContext,
                   javax.xml.transform.Result result)
        Execute for the given item and dynamic context, sending the output to the specified result.
        Parameters:
        item - The context item. May be null however if the query accesses the context item an error will be raised.
        dynamicContext - The dynamicContext.
        result - The target result.
      • execute

        void execute(javax.xml.transform.Result result)
        Execute for no source, sending the output to the specified result. The default dynamic context settings are used. Valid only if the query does not access the context item.
        Parameters:
        result - The target result.
      • execute

        void execute(XDynamicContext dynamicContext,
                   javax.xml.transform.Result result)
        Execute for no source, sending the output to the specified result. Valid only if the query does not access the context item.
        Parameters:
        dynamicContext - The dynamicContext.
        result - The target result.
      • registerImportedSchemas

        void registerImportedSchemas()
        Registers any schemas that the query imports using import schema declarations with the XFactory that created this XQueryExecutable instance.

        By default imported schemas are not registered, so they will not be used to validate input documents - they can only be used to validate result trees in that case.

        If registerImportedSchemas is not called, the imported schemas will be loaded every time one of the execute methods is called, so there can be a tremendous performance benefit to registering the schemas.

        See Also:
        XFactory.registerSchema(Source)
IBM WebSphere Application Server XML API JavadocTM
Release 8.5