public interface XMLResolver extends EntityResolver, URIResolver
Implementations are expected to be thread-safe.
Modifier and Type | Method and Description |
---|---|
void |
addRewriteURIEntry(String uriStartString,
String rewritePrefix)
Adds specified <rewriteURI> entry to the XML catalogs
being used by this resolver.
|
String |
getResolvedEntity(String publicId,
String systemId)
Resolves specified the public identifier/system identifier of an entity.
|
default Source |
resolve(String href,
String base) |
default InputSource |
resolveEntity(String publicId,
String systemId) |
String |
resolveURI(String uri)
Resolves specified URI.
|
default URL |
resolveURI(String uri,
URL baseURL)
Resolves specified URI.
|
void addRewriteURIEntry(String uriStartString, String rewritePrefix)
uriStartString
- prefix of an URIrewritePrefix
- new prefix for URIs starting with
uriStartString. Must be the start of an absolute URL
in order to be able to use this entry to resolve URIs.String getResolvedEntity(String publicId, String systemId)
null
.publicId
- the public identifier of the entity.
May be null
.systemId
- the system identifier of the entity.
Not null
.null
String resolveURI(String uri)
null
.uri
- URI for which a mapping is to be found.
This URI may have a fragment.null
default URL resolveURI(String uri, URL baseURL) throws MalformedURLException
uri
- URI for which a mapping is to be found.
This URI may have a fragment.baseURL
- base URL used if uri needs to be parsed as an
URL. May be null
.MalformedURLException
- if specified URI needs to be
parsed as an URL but is malformeddefault InputSource resolveEntity(String publicId, String systemId)
resolveEntity
in interface EntityResolver
default Source resolve(String href, String base) throws TransformerException
resolve
in interface URIResolver
TransformerException