com.ibm.xml.xapi
Interface XModuleResolver
- public interface XModuleResolver
Implement this class to override the default XQuery module resolution behaviour.
Implementations should be registered with the XStaticContext and are used to resolve
modules that are imported in XQuery using a module import
.
The default behaviour for resolving modules is to use the base URI of the importing module to resolve the imported module's location. If the base URI is not available, the current working directory will be used. The processor will attempt to locate one module per location hint. If no modules can be located for the target namespace, an error will be raised.
See Also:
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getModule(java.lang.String namespace,java.util.List<java.lang.String> locations,java.lang.String baseURI)
Get the modules for the given
namespace and locations .
|
Method Detail
getModule
- java.util.List<? extends javax.xml.transform.Source> getModule( java.lang.String namespace,
- java.util.List<java.lang.String> locations,
- java.lang.String baseURI)
Parameters:
namespace
- The module namespace. locations
- The location hints for the module. These correspond to the URIs
specified after the at
in a module import
. May be an
empty list if none were specified. Returns:
The modules for the given namespace and locations or
null
to
use the default resolution behaviour. If an empty list is returned, an error
will be raised.
namespace
andlocations
. It is recommended that eachSource
object included in the returnedList
have its system id set. This allows the processor to avoid parsing the same module more than once in the case where it is imported into more than one module.