Package net.sf.saxon.s9api
Class MessageListener2Proxy
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.SequenceWriter
net.sf.saxon.s9api.MessageListener2Proxy
This class implements a Receiver that can receive xsl:message output and send it to a
user-supplied MessageListener.
-
Field Summary
Fields 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
ConstructorsModifierConstructorDescriptionprotectedMessageListener2Proxy(MessageListener2 listener, PipelineConfiguration pipe) -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend an item to the sequence, performing any necessary type-checking and conversionvoidcharacters(CharSequence s, Location locationId, int properties) Produce text content output.Get the wrapped MessageListenervoidprocessingInstruction(String target, CharSequence data, Location locationId, int properties) Output a processing instructionvoidstartDocument(int properties) Start of a document node.voidstartElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) Output an element start tag.voidAbstract method to be supplied by subclasses: output one item in the sequence.Methods inherited from class net.sf.saxon.event.SequenceWriter
close, comment, endDocument, endElement, getTreeModel, setTreeModel, setUnparsedEntity, usesTypeAnnotationsMethods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getNamePool, getPipelineConfiguration, getSystemId, handlesAppend, open, setPipelineConfiguration, setSystemId
-
Constructor Details
-
MessageListener2Proxy
-
-
Method Details
-
getMessageListener
Get the wrapped MessageListener- Returns:
- the wrapped MessageListener
-
startDocument
Start of a document node.- Specified by:
startDocumentin interfaceReceiver- Overrides:
startDocumentin classSequenceWriter- Parameters:
properties-- Throws:
XPathException- if an error occurs
-
startElement
public void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException Output an element start tag.- Specified by:
startElementin interfaceReceiver- Overrides:
startElementin classSequenceWriter- Parameters:
elemName- the name of the element.type- the type annotation of the element.attributes- the attributes of this elementnamespaces- the in-scope namespaces of this element: generally this is all the in-scope namespaces, without relying on inheriting namespaces from parent elementslocation- an object providing information about the module, line, and column where the node originatedproperties- bit-significant properties of the element node. If there are no relevant properties, zero is supplied. The definitions of the bits are in classReceiverOption- Throws:
XPathException- if an error occurs
-
characters
Produce text content output.- Specified by:
charactersin interfaceReceiver- Overrides:
charactersin classSequenceWriter- Parameters:
s- The String to be outputlocationId- the location of the node in the source, or of the instruction that created itproperties- bit-significant flags for extra information, e.g. disable-output-escaping @throws net.sf.saxon.trans.XPathException- Throws:
XPathException- if an error occurs
-
processingInstruction
public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException Description copied from interface:ReceiverOutput a processing instruction- Specified by:
processingInstructionin interfaceReceiver- Overrides:
processingInstructionin classSequenceWriter- Parameters:
target- The PI name. This must be a legal name (it will not be checked).data- The data portion of the processing instructionlocationId- provides information such as line number and system ID.properties- Additional information about the PI.- Throws:
XPathException- if an error occurs
-
append
Append an item to the sequence, performing any necessary type-checking and conversion- Specified by:
appendin interfaceReceiver- Overrides:
appendin classSequenceWriter- Parameters:
item- the item to be appendedlocationId- the location of the calling instruction, for diagnosticscopyNamespaces- if the item is an element node, this indicates whether its namespaces need to be copied. Values areReceiverOption.ALL_NAMESPACES; the default (0) means- Throws:
XPathException- if an error occurs
-
write
Abstract method to be supplied by subclasses: output one item in the sequence.- Specified by:
writein classSequenceWriter- Parameters:
item- the item to be written to the sequence- Throws:
XPathException- if any failure occurs while writing the item
-