public class StandardModuleURIResolver extends java.lang.Object implements ModuleURIResolver
jar
URI scheme; it also
accepts classpath
URIs as defined in the Spring framework.Constructor and Description |
---|
StandardModuleURIResolver()
Create a StandardModuleURIResolver.
|
StandardModuleURIResolver(Configuration config)
Create a StandardModuleURIResolver, with a supplied configuration
|
Modifier and Type | Method and Description |
---|---|
javax.xml.transform.stream.StreamSource[] |
resolve(java.lang.String moduleURI,
java.lang.String baseURI,
java.lang.String[] locations)
Resolve a module URI and associated location hints.
|
protected javax.xml.transform.stream.StreamSource |
resolveLocationHint(java.lang.String baseURI,
java.lang.String locationHint)
Resolve a location hint appearing in an "import module" declaration
|
protected javax.xml.transform.stream.StreamSource |
resolveModuleURI(java.lang.String moduleURI,
java.lang.String baseURI)
Attempt to resolve the module namespace URI without the help of location hints.
|
void |
setConfiguration(Configuration config)
Set the Configuration that this resolver uses.
|
public StandardModuleURIResolver()
public StandardModuleURIResolver(Configuration config)
config
- the Saxon Configuration objectpublic void setConfiguration(Configuration config)
config
- the Saxon Configuration objectpublic javax.xml.transform.stream.StreamSource[] resolve(java.lang.String moduleURI, java.lang.String baseURI, java.lang.String[] locations) throws XPathException
The logic of this is as follows:
resolve
in interface ModuleURIResolver
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 knownlocations
- The set of URIs specified in the "at" clause of "import module",
which serve as location hints for the moduleXPathException
- (error XQST0059) if the module cannot be locatedprotected javax.xml.transform.stream.StreamSource resolveModuleURI(java.lang.String moduleURI, java.lang.String baseURI)
moduleURI
- the namespace URI of the module being importedbaseURI
- the base URI of the module containing the "import module" declarationprotected javax.xml.transform.stream.StreamSource resolveLocationHint(java.lang.String baseURI, java.lang.String locationHint) throws XPathException
baseURI
- the base URI of the "import module" declarationlocationHint
- the location hint, as writtenXPathException
- if the URI is invalid or can't be resolved (but not if the
module simply doesn't exist at that location)Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.