XSLT <xsl:message>
Element
Definition and Usage
The <xsl:message>
element writes a message to the output. This element is mainly used for reporting errors.
The element can contain almost any other XSL element (<xsl:text>
, <xsl:value-of>
, etc.).
The terminate
attribute allows you to choose whether to exit processing or continue processing when an error occurs.
Syntax
Attributes
Attribute | Value | Description |
---|---|---|
terminate | yes <br>no | Optional. "yes": Terminates processing after the message is written to the output. "no": Continues processing after the message is written to the output. Default is "no". |
Example 1
Checks if artist
is an empty string. If it is, exits the XSL processor and displays a message: