net.sf.saxon.s9api
Class MessageListenerProxy

java.lang.Object
  extended by net.sf.saxon.event.SequenceReceiver
      extended by net.sf.saxon.event.SequenceWriter
          extended by net.sf.saxon.s9api.MessageListenerProxy
All Implemented Interfaces:
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
 
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
 
Constructor Summary
protected MessageListenerProxy(MessageListener listener)
           
 
Method Summary
 void append(Item item, int locationId, int copyNamespaces)
          Append an item to the sequence, performing any necessary type-checking and conversion
 void characters(CharSequence s, int locationId, int properties)
          Produce text content output.
 MessageListener getMessageListener()
          Get the wrapped MessageListener
 void startDocument(int properties)
          Start of a document node.
 void startElement(int nameCode, int 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
getConfiguration, getNamePool, getPipelineConfiguration, getSystemId, open, setPipelineConfiguration, setSystemId, setUnparsedEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageListenerProxy

protected MessageListenerProxy(MessageListener listener)
Method Detail

getMessageListener

public MessageListener getMessageListener()
Get the wrapped MessageListener


startDocument

public void startDocument(int properties)
                   throws XPathException
Start of a document node.

Specified by:
startDocument in interface Receiver
Overrides:
startDocument in class SequenceWriter
Parameters:
properties - bit-significant integer indicating properties of the document node. The definitions of the bits are in class ReceiverOptions
Throws:
XPathException

startElement

public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
                  throws XPathException
Output an element start tag.

Specified by:
startElement in interface Receiver
Overrides:
startElement in class SequenceWriter
Parameters:
nameCode - The element name code - a code held in the Name Pool
typeCode - Integer code identifying the type of this element. Zero identifies the default type, that is xs:anyType
properties - bit-significant flags indicating any special information
locationId - an integer which can be interpreted using a LocationProvider to return information such as line number and system ID. If no location information is available, the value zero is supplied.
Throws:
XPathException

characters

public void characters(CharSequence s,
                       int locationId,
                       int properties)
                throws XPathException
Produce text content output.

Specified by:
characters in interface Receiver
Overrides:
characters in class SequenceWriter
Parameters:
s - The String to be output
properties - bit-significant flags for extra information, e.g. disable-output-escaping
locationId - an integer which can be interpreted using a LocationProvider 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 class SequenceWriter
Parameters:
item - the item to be appended
locationId - the location of the calling instruction, for diagnostics
copyNamespaces - if the item is an element node, this indicates whether its namespaces need to be copied. Values are NodeInfo.ALL_NAMESPACES, NodeInfo.LOCAL_NAMESPACES, NodeInfo.NO_NAMESPACES
Throws:
XPathException

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 class SequenceWriter
Parameters:
item - the item to be written to the sequence
Throws:
XPathException