Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XSLT Element

XSLT xsl:message Element


XSLT Element Reference Manual Complete XSLT Element Reference Manual


Definition and Usage

xsl:message element writes a message to the output. This element is mainly used to report errors.

This element can contain almost any other XSL element (xsl:text 、xsl:value-of etc.).

The terminate attribute lets you choose whether to stop processing or continue processing when an error occurs.


Syntax

property

property Value Description
terminate yes
no Optional. "yes": terminate processing after the message is written to the output. "no": continue processing after the message is written to the output. The default is "no".

Example 1

Check whether artist is an empty string. If it is, exit the XSL processor and display a message:

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Title:

Artist:

Error: Artist is an empty string!


XSLT Element Reference Manual Complete XSLT Element Reference Manual