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 nameCode, SchemaType typeCode, 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
attribute, bulkCopyElementNode, close, comment, endDocument, endElement, getTreeModel, graftElementNode, isReadyForBulkCopy, isReadyForGrafting, namespace, setTreeModel, setUnparsedEntity, startContent, 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- 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, Location location, int properties) throws XPathException Output an element start tag.- Specified by:
startElementin interfaceReceiver- Overrides:
startElementin 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:anyTypelocation-properties- bit-significant flags indicating any special information- 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 for any failure- 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 areReceiverOptions.ALL_NAMESPACES,ReceiverOptions.LOCAL_NAMESPACES; the default (0) means no namespaces- Throws:
XPathException
-
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
-