com.ddtek.xquery
Interface ModuleURIResolver
- public interface ModuleURIResolver
An object that implements this interface that can be called by
DataDirect XQuery to turn a module URI and location hints used in a
ModuleImport,
into a set of StreamSource objects.
resolve
public StreamSource[] resolve(String moduleURI,
String baseURI,
String[] locationHints)
throws TransformerException
- Resolve the module with the provided module URI, base URI and location hints.
- Parameters:
moduleURI - the module namespace URI.
Can not be null.baseURI - the base URI of the module containing
the "... import module ..." declaration;
or null if no base URI is known.locationHints - the array of location hints provided
in the "at" clause
of the "... import module ..."
declaration. An empty array is specified if
no "at" clause is specified.
- Returns:
- an array of
StreamSource objects each identifying
the contents of a module to be imported.
Each StreamSource must contain:
-
A non-
null absolute System ID which will be used
as the location URI of the imported module.
-
Optionally an
InputStream or Reader
representing the text of the module. If neither of these
are present, the system will attempt to resolve
the text of the module using the location URI
and the system's URI resolver.
If null is returned, the system will attempt
to resolve the module using the default module resolver.
- Throws:
TransformerException - if an error occurs when trying to
resolve the module.