Not
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
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 normal error-handling mechanisms.
<xsl:message
terminate = "yes" | "no" >
</xsl:message>
Attributes
- terminate
Specifies whether the transformation should terminate upon executing this instruction. This attribute can have one of two string values: "yes" or "no". When theterminateattribute is set to "yes", the content of the element is displayed as the part of the system-level error message, and the transformation terminates. When it is set to "no", the transformation proceeds, ignoring the error message. The default value is"no".
Element Information
Number of occurrences |
Unlimited |
Parent elements |
xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:fallback, xsl:for-each, xsl:if, xsl:message, xsl:otherwise, xsl:param, xsl:processing-instruction, xsl:template, xsl:variable, xsl:when, xsl:with-param, outputelements |
Child elements |
xsl:apply-templates, xsl:attribute, xsl:call-template, xsl:choose, xsl:comment, xsl:copy, xsl:copy-of, xsl:element, xsl:for-each, xsl:if, xsl:processing-instruction, xsl:text, xsl:value-of, xsl:variable, output elements |
Remarks
The <xsl:message> element provides a mechanism to debug XSLT style sheets in progress. Whenever an <xsl:message> element is encountered, if the terminate flag is set to "yes", 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 <xsl:message> a good way to watch individual elements.
Example
The following topic provides an example of the <xsl:message> element.