- All Implemented Interfaces:
public class StandardOutputResolver extends java.lang.Object implements OutputURIResolverThis class defines the default OutputURIResolver. This is a counterpart to the JAXP URIResolver, but is used to map the URI of a secondary result document to a Result object which acts as the destination for the new document.
Constructors Constructor Description
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description
close(javax.xml.transform.Result result)Signal completion of the result document.
getInstance()Get a singular instance
newInstance()Get an instance of this OutputURIResolver class.
resolve(java.lang.String href, java.lang.String base)Resolve an output URI
public static StandardOutputResolver getInstance()Get a singular instance
- the singleton instance of the class
public StandardOutputResolver newInstance()Get an instance of this OutputURIResolver class.
This method is called every time an xsl:result-document instruction is evaluated (with an href attribute). The resolve() and close() methods will be called on the returned instance.
This OutputURIResolver is stateless (that is, it retains no information between resolve() and close()), so the same instance can safely be returned each time. For a stateful OutputURIResolver, it must either take care to be thread-safe (handling multiple invocations of xsl:result-document concurrently), or it must return a fresh instance of itself for each call.
public javax.xml.transform.Result resolve(java.lang.String href, java.lang.String base) throws XPathExceptionResolve an output URI
- Specified by:
href- The relative URI of the output document. This corresponds to the href attribute of the xsl:result-document instruction.
base- The base URI that should be used. This is the base output URI, normally the URI of the principal output file.
- a Result object representing the destination for the XML document
protected javax.xml.transform.Result createResult(java.net.URI absoluteURI) throws XPathException, java.io.IOException
public void close(javax.xml.transform.Result result) throws XPathExceptionSignal completion of the result document. This method is called by the system when the result document has been successfully written. It allows the resolver to perform tidy-up actions such as closing output streams, or firing off processes that take this result tree as input. Note that the OutputURIResolver is stateless, so the original href is supplied to identify the document that has been completed.