Class MessageWarner

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

    public class MessageWarner
    extends XMLEmitter
    MessageWarner is a user-selectable receiver for XSLT xsl:message output. It causes xsl:message output to be notified to the warning() method of the JAXP ErrorListener, or to the error() method if terminate="yes" is specified. This behaviour is specified in recent versions of the JAXP interface specifications, but it is not the default behaviour, for backwards compatibility reasons.

    The text of the message that is sent to the ErrorListener is an XML serialization of the actual message content.

    • Constructor Detail

      • MessageWarner

        public MessageWarner()
    • Method Detail

      • startDocument

        public void startDocument​(int properties)
                           throws XPathException
        Description copied from class: XMLEmitter
        Start of a document node. Nothing is done at this stage: the opening of the output file is deferred until some content is written to it.
        Specified by:
        startDocument in interface Receiver
        Overrides:
        startDocument in class XMLEmitter
        Parameters:
        properties - bit-significant integer indicating properties of the document node. The definitions of the bits are in class ReceiverOption
        Throws:
        XPathException - if an error occurs
      • processingInstruction

        public void processingInstruction​(java.lang.String target,
                                          UnicodeString data,
                                          Location locationId,
                                          int properties)
                                   throws XPathException
        Description copied from class: XMLEmitter
        Handle a processing instruction.
        Specified by:
        processingInstruction in interface Receiver
        Overrides:
        processingInstruction in class XMLEmitter
        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