public interface RelativeURIResolver
extends javax.xml.transform.URIResolver
This extended interface defines a URIResolver that separates the two functions of resolving a relative URI against a base URI, and fetching a resource with that absolute URI. If the URI resolver supplied to Saxon implements this interface, the absolute URI associated with a loaded document will be the URI returned by this resolver.
The particular motivation for providing this interface is to allow a URIResolver to wrap a .NET XmlResolver, which has additional capability not present in the JAXP interface.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
makeAbsolute(java.lang.String href,
java.lang.String base)
Create an absolute URI from a relative URI and a base URI.
|
javax.xml.transform.Source |
resolve(java.lang.String href,
java.lang.String base)
Called by the processor when it encounters
an xsl:include, xsl:import, or document() function.
|
void |
setExpectedMediaType(java.lang.String mediaType)
Specify the media type of the resource that is expected to be delivered.
|
javax.xml.transform.Source resolve(java.lang.String href,
java.lang.String base)
throws javax.xml.transform.TransformerException
resolve in interface javax.xml.transform.URIResolverhref - An href attribute, which may be relative or absolute.base - The base URI against which the first argument will be made
absolute if the absolute URI is required.javax.xml.transform.TransformerException - if an error occurs when trying to
resolve the URI.java.lang.String makeAbsolute(java.lang.String href,
java.lang.String base)
throws javax.xml.transform.TransformerException
href - A relative or absolute URI, to be resolved against the specified base URIbase - The base URI against which the first argument will be made
absolute if the absolute URI is required.resolve method.javax.xml.transform.TransformerExceptionvoid setExpectedMediaType(java.lang.String mediaType)