Class 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.
    • Method Detail

      • getMessageListener

        public MessageListener getMessageListener()
        Get the wrapped MessageListener
        Returns:
        the wrapped MessageListener
      • startElement

        public void startElement​(NodeName nameCode,
                                 SchemaType 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 - 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 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
      • 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 - if any failure occurs while writing the item