| java.lang.Object net.sf.saxon.query.StandardModuleURIResolver
StandardModuleURIResolver | public class StandardModuleURIResolver implements ModuleURIResolver(Code) | | This class is the standard ModuleURIResolver used to implement the "import module" declaration
in a Query Prolog. It is used when no user-defined ModuleURIResolver has been specified, or when
the user-defined ModuleURIResolver decides to delegate to the standard ModuleURIResolver.
author: Michael H. Kay |
Method Summary | |
public static StreamSource | getQuerySource(URI absoluteURI) Get a StreamSource object representing the source of a query, given its URI.
This method attempts to discover the encoding by reading any HTTP headers.
If the encoding can be determined, it returns a StreamSource containing a Reader that
performs the required decoding. | public StreamSource[] | resolve(String moduleURI, String baseURI, String[] locations) Resolve a module URI and associated location hints.
Parameters: moduleURI - The module namespace URI of the module to be imported; or null whenloading a non-library module. Parameters: baseURI - The base URI of the module containing the "import module" declaration;null if no base URI is known Parameters: locations - The set of URIs specified in the "at" clause of "import module",which serve as location hints for the module an array of StreamSource objects each identifying the contents of a module to beimported. |
getQuerySource | public static StreamSource getQuerySource(URI absoluteURI) throws StaticError(Code) | | Get a StreamSource object representing the source of a query, given its URI.
This method attempts to discover the encoding by reading any HTTP headers.
If the encoding can be determined, it returns a StreamSource containing a Reader that
performs the required decoding. Otherwise, it returns a StreamSource containing an
InputSource, leaving the caller to sort out encoding problems.
Parameters: absoluteURI - the absolute URI of the source query a StreamSource containing a Reader or InputSource, as well as a systemID representingthe base URI of the query. throws: net.sf.saxon.trans.StaticError - if the URIs are invalid or cannot be resolved or dereferenced, orif any I/O error occurs |
resolve | public StreamSource[] resolve(String moduleURI, String baseURI, String[] locations) throws XPathException(Code) | | Resolve a module URI and associated location hints.
Parameters: moduleURI - The module namespace URI of the module to be imported; or null whenloading a non-library module. Parameters: baseURI - The base URI of the module containing the "import module" declaration;null if no base URI is known Parameters: locations - The set of URIs specified in the "at" clause of "import module",which serve as location hints for the module an array of StreamSource objects each identifying the contents of a module to beimported. Each StreamSource must contain anon-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. The methodmay also return null, in which case the system attempts to resolve the URI using thestandard module URI resolver. throws: net.sf.saxon.trans.XPathException - if the module cannot be located |
|
|