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
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
FieldsModifier and TypeFieldDescription(package private) Builder(package private) Controller(package private) ResultFields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiverFields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemIdFields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
ConstructorsConstructorDescriptionTransformerReceiver(Controller controller) Create a TransformerHandlerImpl and initialise variables. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Override the behaviour of endDocument() in ProxyReceiver, so that it fires off the transformation of the constructed documentGet the output destination of the transformationGet the Transformer used for this transformationvoidopen()Start of event streamvoidSet the output destination of the transformationvoidsetSystemId(String systemId) Set the SystemId of the documentvoidstartElement(int nameCode, int typeCode, int locationId, int properties) Notify the start of an elementMethods inherited from class net.sf.saxon.event.ProxyReceiver
attribute, characters, comment, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, processingInstruction, setPipelineConfiguration, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocumentMethods inherited from class net.sf.saxon.event.SequenceReceiver
append, getPipelineConfiguration, getSystemId
-
Field Details
-
controller
Controller controller -
builder
Builder builder -
result
Result result
-
-
Constructor Details
-
TransformerReceiver
Create a TransformerHandlerImpl and initialise variables.
-
-
Method Details
-
open
Start of event stream- Specified by:
openin interfaceReceiver- Overrides:
openin classProxyReceiver- Throws:
XPathException
-
getTransformer
Get the Transformer used for this transformation -
setSystemId
Set the SystemId of the document- Specified by:
setSystemIdin interfaceReceiver- Specified by:
setSystemIdin interfaceResult- Overrides:
setSystemIdin classProxyReceiver- Parameters:
systemId- the URI used to identify the tree being passed across this interface
-
startElement
public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException Notify the start of an element- Specified by:
startElementin interfaceReceiver- Overrides:
startElementin classProxyReceiver- 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.locationId- an integer which can be interpreted using aLocationProviderto return information such as line number and system ID. If no location information is available, the value zero is supplied.properties- bit-significant properties of the element node.- Throws:
XPathException
-
setResult
Set the output destination of the transformation -
getResult
Get the output destination of the transformation -
close
Override the behaviour of endDocument() in ProxyReceiver, so that it fires off the transformation of the constructed document- Specified by:
closein interfaceReceiver- Overrides:
closein classProxyReceiver- Throws:
XPathException
-