Package net.sf.saxon.s9api
Class MessageListenerProxy
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.SequenceWriter
net.sf.saxon.s9api.MessageListenerProxy
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, systemId
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MessageListenerProxy
(MessageListener listener, PipelineConfiguration pipe) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append an item to the sequence, performing any necessary type-checking and conversionvoid
characters
(UnicodeString s, Location locationId, int properties) Produce text content output.Get the wrapped MessageListenervoid
processingInstruction
(String target, UnicodeString data, Location locationId, int properties) Output a processing instructionvoid
startDocument
(int properties) Start of a document node.void
startElement
(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) Output an element start tag.void
Abstract 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, usesTypeAnnotations
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getNamePool, getPipelineConfiguration, getSystemId, handlesAppend, open, setPipelineConfiguration, setSystemId
-
Constructor Details
-
MessageListenerProxy
-
-
Method Details
-
getMessageListener
Get the wrapped MessageListener- Returns:
- the wrapped MessageListener
-
startDocument
Start of a document node.- Specified by:
startDocument
in interfaceReceiver
- Overrides:
startDocument
in 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:
startElement
in interfaceReceiver
- Overrides:
startElement
in 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
-
processingInstruction
public void processingInstruction(String target, UnicodeString data, Location locationId, int properties) throws XPathException Description copied from interface:Receiver
Output a processing instruction- Specified by:
processingInstruction
in interfaceReceiver
- Overrides:
processingInstruction
in 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
-
characters
Produce text content output.- Specified by:
characters
in interfaceReceiver
- Overrides:
characters
in 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
-
append
Append an item to the sequence, performing any necessary type-checking and conversion- Specified by:
append
in interfaceReceiver
- Overrides:
append
in 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:
write
in classSequenceWriter
- Parameters:
item
- the item to be written to the sequence- Throws:
XPathException
- if any failure occurs while writing the item
-