com.icl.saxon

Class TransformerHandlerImpl

Implemented Interfaces:
ContentHandler, DTDHandler, LexicalHandler, TransformerHandler

public class TransformerHandlerImpl
extends ContentEmitter
implements TransformerHandler

TransformerHandlerImpl implements the javax.xml.transform.sax.TransformerHandler interface. It acts as a ContentHandler and LexicalHandler which receives a stream of SAX events representing an input document, and performs a transformation treating this SAX stream as the source document of the transformation.
Author:
Michael H. Kay

Field Summary

(package private) Builder
builder
(package private) Controller
controller
(package private) Result
result
(package private) String
systemId

Constructor Summary

TransformerHandlerImpl(Controller controller)
Create a TransformerHandlerImpl and initialise variables.

Method Summary

void
endDocument()
Override the behaviour of endDocument() in ContentEmitter, so that it fires off the transformation of the constructed document
Result
getResult()
Get the output destination of the transformation
String
getSystemId()
Get the systemId of the document
Transformer
getTransformer()
Get the Transformer used for this transformation
void
setResult(Result result)
Set the output destination of the transformation
void
setSystemId(String url)
Set the SystemId of the document

Methods inherited from class com.icl.saxon.ContentEmitter

characters, comment, endCDATA, endDTD, endDocument, endElement, endEntity, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, setEmitter, setNamePool, skippedEntity, startCDATA, startDTD, startDocument, startElement, startEntity, startPrefixMapping, unparsedEntityDecl

Field Details

builder

(package private)  Builder builder

controller

(package private)  Controller controller

result

(package private)  Result result

systemId

(package private)  String systemId

Constructor Details

TransformerHandlerImpl

protected TransformerHandlerImpl(Controller controller)
Create a TransformerHandlerImpl and initialise variables. The constructor is protected, because the Filter should be created using newTransformerHandler() in the SAXTransformerFactory class

Method Details

endDocument

public void endDocument()
            throws SAXException
Override the behaviour of endDocument() in ContentEmitter, so that it fires off the transformation of the constructed document
Overrides:
endDocument in interface ContentEmitter

getResult

public Result getResult()
Get the output destination of the transformation

getSystemId

public String getSystemId()
Get the systemId of the document

getTransformer

public Transformer getTransformer()
Get the Transformer used for this transformation

setResult

public void setResult(Result result)
Set the output destination of the transformation

setSystemId

public void setSystemId(String url)
Set the SystemId of the document