Package net.sf.saxon.s9api
Interface MessageListener2
-
public interface MessageListener2
A user-written implementation of the MessageListener interface may be registered with the XsltTransformer to receive notification of xsl:message output. Each xsl:message instruction that is evaluated results in a single call to the MessageListener.The
MessageListener2
interface differs fromMessageListener
in allowing the error code supplied toxsl:message
to be made available.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
message(XdmNode content, QName errorCode, boolean terminate, javax.xml.transform.SourceLocator locator)
Notify a message written using thexsl:message
instruction
-
-
-
Method Detail
-
message
void message(XdmNode content, QName errorCode, boolean terminate, javax.xml.transform.SourceLocator locator)
Notify a message written using thexsl:message
instruction- Parameters:
content
- a document node representing the message content. Note that the output ofxsl:message
is always an XML document node. It can be flattened to obtain the string value if required by callinggetStringValue()
.errorCode
- a QName containing the error code supplied to the call on xsl:message, or its default of err:XTMM9000.terminate
- Set to true ifterminate="yes"
was specified or to false otherwise. The message listener does not need to take any special action based on this parameter, but the information is available if required. Ifterminate="yes"
was specified, then the transformation will abort with an exception immediately on return from this callback.locator
- an object that contains the location of thexsl:message
instruction in the stylesheet that caused this message to be output. This provides access to the URI of the stylesheet module and the line number of thexsl:message
instruction.
-
-