xsl:message Element
The <xsl:message> element sends a text message to either the message buffer or a message dialog box, depending on the environment in which the element call is made. It also raises a system-level error message that can be trapped through typical error-handling mechanisms.
<xsl:message
terminate = "yes|no" >
</xsl:message>
Attributes
- terminate
The terminate attribute indicates that the XSLT document should stop processing.
Element Information
Number of occurrences | Unlimited |
Parent elements | Any element where the content is a template. |
Child elements | Any element that can occur in a template. |
Remarks
The <xsl:message> element provides a mechanism to debug XSL Transformations (XSLT) style sheets in progress. Whenever an <xsl:message> element is encountered, if the terminate flag is set to "yes" (the default), then the XSLT processor quits, and sends a system-level error message. Expressions contained within the <xsl:message> element evaluate relative to the current context, making message a good way to watch individual elements.
If terminate is set to "no", then the Microsoft XML Parser (MSXML) 3.0 ignores the command. This is a good way to disable error handling without removing it entirely from your Extensible Stylesheet Language (XSL) style sheet, although upcoming implementations can send such messages out to a log file. (This is not currently supported.)
See Also
XSLT Elements | xsl:comment Element
Last updated on Saturday, April 10, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.