Class MessageListener2Proxy

  • All Implemented Interfaces:
    javax.xml.transform.Result, Receiver

    class MessageListener2Proxy
    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 MessageListener2 getMessageListener()
        Get the wrapped MessageListener
        Returns:
        the wrapped MessageListener
      • 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 interface Receiver
        Overrides:
        startElement in class SequenceWriter
        Parameters:
        elemName - the name of the element.
        type - the type annotation of the element.
        attributes - the attributes of this element
        namespaces - the in-scope namespaces of this element: generally this is all the in-scope namespaces, without relying on inheriting namespaces from parent elements
        location - an object providing information about the module, line, and column where the node originated
        properties - bit-significant properties of the element node. If there are no relevant properties, zero is supplied. The definitions of the bits are in class ReceiverOption
        Throws:
        XPathException - if an error occurs
      • characters

        public void characters​(java.lang.CharSequence s,
                               Location 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
        locationId - the location of the node in the source, or of the instruction that created it
        properties - bit-significant flags for extra information, e.g. disable-output-escaping @throws net.sf.saxon.trans.XPathException
        Throws:
        XPathException - if an error occurs
      • processingInstruction

        public void processingInstruction​(java.lang.String target,
                                          java.lang.CharSequence data,
                                          Location locationId,
                                          int properties)
                                   throws XPathException
        Description copied from interface: Receiver
        Output a processing instruction
        Specified by:
        processingInstruction in interface Receiver
        Overrides:
        processingInstruction in class SequenceWriter
        Parameters:
        target - The PI name. This must be a legal name (it will not be checked).
        data - The data portion of the processing instruction
        locationId - provides information such as line number and system ID.
        properties - Additional information about the PI.
        Throws:
        XPathException - if an error occurs
      • append

        public void append​(Item item,
                           Location locationId,
                           int copyNamespaces)
                    throws XPathException
        Append an item to the sequence, performing any necessary type-checking and conversion
        Specified by:
        append in interface Receiver
        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 ReceiverOption.ALL_NAMESPACES; the default (0) means
        Throws:
        XPathException - if an error occurs
      • 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