net.sf.saxon.dotnet
Class DotNetURIResolver
java.lang.Object
net.sf.saxon.dotnet.DotNetURIResolver
- RelativeURIResolver, URIResolver
public class DotNetURIResolver
extends java.lang.Object
This class implements the JAXP URIResolver as a wrapper around
a .NET XmlResolver.
Source | dereference(String uri) - Called by the processor when it encounters
an xsl:include, xsl:import, or document() function.
|
XmlResolver | getXmlResolver()
|
String | makeAbsolute(String href, String base) - Create an absolute URI from a relative URI and a base URI.
|
Source | resolve(String href, String base) - Called by an XSLT processor when it encounters
an xsl:include, xsl:import, or document() function.
|
void | setExpectedMediaType(String mediaType) - Specify the media type of the resource that is expected to be delivered.
|
DotNetURIResolver
public DotNetURIResolver(XmlResolver resolver)
dereference
public Source dereference(String uri)
throws TransformerException
Called by the processor when it encounters
an xsl:include, xsl:import, or document() function.
- dereference in interface RelativeURIResolver
uri
- The absolute URI to be dereferenced
- A Source object, or null if the href cannot be dereferenced,
and the processor should try to resolve the URI itself.
getXmlResolver
public XmlResolver getXmlResolver()
makeAbsolute
public String makeAbsolute(String href,
String base)
throws TransformerException
Create an absolute URI from a relative URI and a base URI. This method performs the
process which is correctly called "URI resolution": this is purely a syntactic operation
on the URI strings, and does not retrieve any resources.
- makeAbsolute in interface RelativeURIResolver
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.
- A string containing the absolute URI that results from URI resolution. If the resource
needs to be fetched, this absolute URI will be supplied as the href parameter in a subsequent
call to the
resolve
method.
resolve
public Source resolve(String href,
String base)
throws TransformerException
Called by an XSLT processor when it encounters
an xsl:include, xsl:import, or document() function.
- resolve in interface RelativeURIResolver
href
- An href attribute, holding a relative or absolute URI.base
- The base URI, ignored if href is absolute.
- A Source object, or null if the href cannot be resolved,
and the processor should try to resolve the URI itself.
setExpectedMediaType
public void setExpectedMediaType(String mediaType)
Specify the media type of the resource that is expected to be delivered. This information is
supplied by the processor primarily to indicate whether the URIResolver is allowed to return
an XML tree already parsed. If the value is "text/plain" then the Source returned by the
resolve() method should be a StreamSource.
- setExpectedMediaType in interface RelativeURIResolver