net.sf.saxon.event

Class TransformerReceiver

Implemented Interfaces:
Receiver, Result

public class TransformerReceiver
extends ProxyReceiver

TransformerReceiver is similar in concept to the JAXP TransformerHandler, except that it implements Saxon's Receiver interface rather than the standard SAX2 interface. This means that it allows nodes with type annotations to be passed down a pipeline from one transformation to another.

Field Summary

Fields inherited from class net.sf.saxon.event.ProxyReceiver

nextReceiver

Fields inherited from class net.sf.saxon.event.SequenceReceiver

pipelineConfiguration, previousAtomic, systemId

Constructor Summary

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

Method Summary

void
close()
Override the behaviour of endDocument() in ProxyReceiver, so that it fires off the transformation of the constructed document
Result
getResult()
Get the output destination of the transformation
Transformer
getTransformer()
Get the Transformer used for this transformation
void
open()
Start of event stream
void
setResult(Result result)
Set the output destination of the transformation
void
setSystemId(String systemId)
Set the SystemId of the document
void
startElement(int nameCode, int typeCode, int locationId, int properties)
Notify the start of an element

Methods inherited from class net.sf.saxon.event.ProxyReceiver

append, attribute, characters, close, comment, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, startElement

Methods inherited from class net.sf.saxon.event.SequenceReceiver

append, getConfiguration, getNamePool, getPipelineConfiguration, getSystemId, open, setPipelineConfiguration, setSystemId, setUnparsedEntity

Constructor Details

TransformerReceiver

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

Method Details

close

public void close()
            throws XPathException
Override the behaviour of endDocument() in ProxyReceiver, so that it fires off the transformation of the constructed document
Specified by:
close in interface Receiver
Overrides:
close in interface ProxyReceiver

getResult

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

getTransformer

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

open

public void open()
            throws XPathException
Start of event stream
Specified by:
open in interface Receiver
Overrides:
open in interface ProxyReceiver

setResult

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

setSystemId

public void setSystemId(String systemId)
Set the SystemId of the document
Specified by:
setSystemId in interface Receiver
Overrides:
setSystemId in interface ProxyReceiver

startElement

public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
            throws XPathException
Notify the start of an element
Specified by:
startElement in interface Receiver
Overrides:
startElement in interface ProxyReceiver
Parameters:
nameCode - integer code identifying the name of the element within the name pool.
typeCode - integer code identifying the element's type within the name pool.
properties - bit-significant properties of the element node.