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
-
- All Implemented Interfaces:
javax.xml.transform.Result
,Receiver
class MessageListenerProxy extends SequenceWriter
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MessageListenerProxy(MessageListener listener, PipelineConfiguration pipe)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(Item item, int locationId, int copyNamespaces)
Append an item to the sequence, performing any necessary type-checking and conversionvoid
characters(java.lang.CharSequence s, int locationId, int properties)
Produce text content output.MessageListener
getMessageListener()
Get the wrapped MessageListenervoid
startDocument(int properties)
Start of a document node.void
startElement(NodeName nameCode, SchemaType typeCode, int locationId, int properties)
Output an element start tag.void
write(Item item)
Abstract method to be supplied by subclasses: output one item in the sequence.-
Methods inherited from class net.sf.saxon.event.SequenceWriter
adviseReuse, attribute, close, comment, endDocument, endElement, namespace, processingInstruction, startContent, usesTypeAnnotations
-
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, getConfiguration, getNamePool, getPipelineConfiguration, getSystemId, open, setPipelineConfiguration, setSystemId, setUnparsedEntity
-
-
-
-
Constructor Detail
-
MessageListenerProxy
protected MessageListenerProxy(MessageListener listener, PipelineConfiguration pipe)
-
-
Method Detail
-
getMessageListener
public MessageListener getMessageListener()
Get the wrapped MessageListener- Returns:
- the wrapped MessageListener
-
startDocument
public void startDocument(int properties) throws XPathException
Start of a document node.- Specified by:
startDocument
in interfaceReceiver
- Overrides:
startDocument
in classSequenceWriter
- Parameters:
properties
- bit-significant integer indicating properties of the document node. The definitions of the bits are in classReceiverOptions
- Throws:
XPathException
- if an error occurs
-
startElement
public void startElement(NodeName nameCode, SchemaType typeCode, int locationId, int properties) throws XPathException
Output an element start tag.- Specified by:
startElement
in interfaceReceiver
- Overrides:
startElement
in classSequenceWriter
- Parameters:
nameCode
- The element name code - a code held in the Name PooltypeCode
- Integer code identifying the type of this element. Zero identifies the default type, that is xs:anyTypeproperties
- bit-significant flags indicating any special informationlocationId
- an integer which can be interpreted using aLocationProvider
to return information such as line number and system ID. If no location information is available, the value zero is supplied.- Throws:
XPathException
- if an error occurs
-
characters
public void characters(java.lang.CharSequence s, int locationId, int properties) throws XPathException
Produce text content output.- Specified by:
characters
in interfaceReceiver
- Overrides:
characters
in classSequenceWriter
- Parameters:
s
- The String to be outputproperties
- bit-significant flags for extra information, e.g. disable-output-escapinglocationId
- an integer which can be interpreted using aLocationProvider
to return information such as line number and system ID. If no location information is available, the value zero is supplied.- Throws:
XPathException
- for any failure
-
append
public void append(Item item, int locationId, int copyNamespaces) throws XPathException
Append an item to the sequence, performing any necessary type-checking and conversion- 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 areNodeInfo.ALL_NAMESPACES
,NodeInfo.LOCAL_NAMESPACES
,NodeInfo.NO_NAMESPACES
- Throws:
XPathException
- if the operation fails
-
write
public void write(Item item) throws XPathException
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
-
-