net.sf.saxon.query
public class StandardModuleURIResolver extends Object implements ModuleURIResolver
Constructor Summary | |
---|---|
StandardModuleURIResolver()
Create a StandardModuleURIResolver. |
Method Summary | |
---|---|
static StandardModuleURIResolver | getInstance()
Get the singular instance of this class |
protected StreamSource | getQuerySource(URI absoluteURI)
Get a StreamSource object representing the source of a query, given its URI.
|
StreamSource[] | resolve(String moduleURI, String baseURI, String[] locations)
Resolve a module URI and associated location hints. |
Returns: the singular instance of this class
Parameters: absoluteURI the absolute URI of the source query
Returns: a StreamSource containing a Reader or InputSource, as well as a systemID representing the base URI of the query.
Throws: XPathException if the URIs are invalid or cannot be resolved or dereferenced, or if any I/O error occurs
Parameters: moduleURI The module namespace URI of the module to be imported; or null when loading a non-library module. baseURI The base URI of the module containing the "import module" declaration; null if no base URI is known locations The set of URIs specified in the "at" clause of "import module", which serve as location hints for the module
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 base URI of the imported module, and either an InputSource or a Reader representing the text of the module.
Throws: XPathException (error XQST0059) if the module cannot be located