net.sf.saxon
Class TransformerHandlerImpl
- ContentHandler, DTDHandler, LexicalHandler, TransformerHandler
public class TransformerHandlerImpl
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.
void | endDocument() - Override the behaviour of endDocument() in ReceivingContentHandler, 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.
|
void | startDocument() - Start of a new document.
|
characters , comment , endCDATA , endDTD , endDocument , endElement , endEntity , endPrefixMapping , getConfiguration , getPipelineConfiguration , ignorableWhitespace , isIgnoringIgnorableWhitespace , notationDecl , processingInstruction , reset , setDocumentLocator , setIgnoreIgnorableWhitespace , setPipelineConfiguration , setReceiver , skippedEntity , startCDATA , startDTD , startDocument , startElement , startEntity , startPrefixMapping , unparsedEntityDecl |
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
controller
- the Controller to be used
endDocument
public void endDocument()
throws SAXException
Override the behaviour of endDocument() in ReceivingContentHandler, so that it fires off
the transformation of the constructed document
- endDocument in interface ReceivingContentHandler
getResult
public Result getResult()
Get the output destination of the transformation
getSystemId
public String getSystemId()
Get the systemId of the document. This will be the systemId obtained from the Locator passed to the
setDocumentLocator(org.xml.sax.Locator)
method if available, otherwise the SystemId passed
to the
setSystemId(String)
method.
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. Note that in reporting location information, Saxon gives
priority to the system Id reported by the SAX Parser in the Locator passed to the
setDocumentLocator(org.xml.sax.Locator)
method. The SystemId passed to this method
is used as the base URI for resolving relative references.
url
- the systemId of the source document
startDocument
public void startDocument()
throws SAXException
Start of a new document. The TransformerHandler is not serially reusable, so this method
must only be called once.
- startDocument in interface ReceivingContentHandler