Package net.sf.saxon.event
Class TransformerReceiver
- java.lang.Object
-
- net.sf.saxon.event.SequenceReceiver
-
- net.sf.saxon.event.ProxyReceiver
-
- net.sf.saxon.event.TransformerReceiver
-
- All Implemented Interfaces:
javax.xml.transform.Result
,Receiver
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
Constructors Constructor Description TransformerReceiver(XsltController controller)
Create a TransformerReceiver and initialise variables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Override the behaviour of close() in ProxyReceiver, so that it fires off the transformation of the constructed documentController
getController()
Get the Controller used for this transformationReceiver
getDestination()
Get the output destination of the transformationvoid
open()
Start of event streamvoid
setDestination(Receiver destination)
Set the output destination of the transformation.void
setSystemId(java.lang.String systemId)
Set the SystemId of the document-
Methods inherited from class net.sf.saxon.event.ProxyReceiver
append, characters, comment, endDocument, endElement, getNamePool, getNextReceiver, processingInstruction, setPipelineConfiguration, setUnderlyingReceiver, setUnparsedEntity, startDocument, startElement, usesTypeAnnotations
-
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
-
-
-
-
Constructor Detail
-
TransformerReceiver
public TransformerReceiver(XsltController controller)
Create a TransformerReceiver and initialise variables.- Parameters:
controller
- the Controller
-
-
Method Detail
-
open
public void open() throws XPathException
Start of event stream- Specified by:
open
in interfaceReceiver
- Overrides:
open
in classProxyReceiver
- Throws:
XPathException
- if an error occurs
-
getController
public Controller getController()
Get the Controller used for this transformation- Returns:
- the controller
-
setSystemId
public void setSystemId(java.lang.String systemId)
Set the SystemId of the document- Specified by:
setSystemId
in interfacejavax.xml.transform.Result
- Overrides:
setSystemId
in classProxyReceiver
- Parameters:
systemId
- the URI used to identify the tree being passed across this interface
-
setDestination
public void setDestination(Receiver destination)
Set the output destination of the transformation. This method must be called before the transformation can proceed.- Parameters:
destination
- the destination to which the transformation output will be written
-
getDestination
public Receiver getDestination()
Get the output destination of the transformation- Returns:
- the output destination. May be null if no destination has been set.
-
close
public void close() throws XPathException
Override the behaviour of close() in ProxyReceiver, so that it fires off the transformation of the constructed document- Specified by:
close
in interfaceReceiver
- Overrides:
close
in classProxyReceiver
- Throws:
XPathException
- if an error occurs
-
-