net.sf.joost
Interface OutputURIResolver


public interface OutputURIResolver

This interface defines an 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.

Author:
Michael H. Kay, Oliver Becker

Method Summary
 void close(Result result)
          Signal completion of the result document.
 Result resolve(String href, String base, Properties outputProperties, boolean append)
          Resolve an output URI.
 

Method Detail

resolve

Result resolve(String href,
               String base,
               Properties outputProperties,
               boolean append)
               throws TransformerException
Resolve an output URI.

Parameters:
href - The relative URI of the output document. This corresponds to the href attribute of the stx:result-document instruction.
base - The base URI that should be used. This is the base URI of the element that contained the href attribute. It may be null if no systemID was supplied for the stylesheet.
outputProperties - The output properties that are in scope for the output document. These are the properties of the main transformation plus the values of the optional attributes output-encoding and output-method.
append - If set to true then the result should be appended to a possibly already existing document.
Returns:
a Result object representing the destination for the XML document. The method can also return null, in which case the standard output URI resolver will be used to create a Result object.
Throws:
TransformerException

close

void close(Result result)
           throws TransformerException
Signal 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 the original Result object is supplied to identify the document that has been completed.

Parameters:
result - The result object returned by the previous call of resolve()
Throws:
TransformerException