|
API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
XStaticContext.setModuleResolver(XModuleResolver)
Method Summary | |
---|---|
List<? extends Source> |
getModule(String namespace,
List<String> locations,
String baseURI)
Get the modules for the given namespace and locations . |
Method Detail |
---|
List<? extends Source> getModule(String namespace, List<String> locations, String baseURI)
namespace
and locations
.
It is recommended that each Source
object included in the returned
List
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.
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.base
- The base URI.
null
to
use the default resolution behaviour. If an empty list is returned, an error
will be raised.
|
IBM Copyright 2004-2008 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |