Saxon.Api
Interface IMessageListener2
-
public interface IMessageListener2
An IMessageListener
can be nominated to handle output
produced by the xsl:message
instruction in an XSLT stylesheet.
This interface affects any xsl:message
instruction
executed by the stylesheet.
If no IMessageListener
is nominated (in the
MessageListener
property of the XsltTransformer
), the output
of xsl:message
is serialized, and is written to standard error
output stream.
If an IMessageListener
is nominated, however, its
Message
method will be called whenever an xsl:message
instruction is evaluated.
The MessageListener2
interface differs from MessageListener
in allowing the error code supplied to xsl:message
to be made available.
Method Summary |
|
---|---|
void | Message(XdmNode content, QName errorCode, bool terminate, IXmlLocation location) Handle the output of an |
Method Detail
Message
QName errorCode,
bool terminate,
IXmlLocation location)
Handle the output of an
xsl:message
instruction in the stylesheetParameters:
content
- a document node representing the message content. Note the putput ofxsl:message
is always an XML document node. It can be flattened to obtain the stringvalue if required by callingGetStringValue()
errorCode
- a QName containing the error supplied to the called on xsl:message, or its default of err:XTM9000.terminate
- Set to true ifterminate ='yes'
was specified or to false otherwiselocation
- an object that contains the location of thexsl:message
This provides access to the URI of the stylesheet module and the line number of thexsl:message