XSLT <message>

<message> tag element helps to debug an XSLT processing. It is similar to javascript alerts. <xsl:> tag buffers a message to XSLT processor which terminates the processing and sends a message to the caller application to display the error message.

Declaration

Following is the syntax declaration of <xsl:message> element.

<xsl:message
terminate = "yes" | "no" >
</xsl:message>

Attributes

Sr.No

Name & Description

1

terminate

It specifies whether the transformation should terminate upon executing this instruction or not. Default is "yes".

Demo Example

This example creates a table of <student> element with its attribute rollno and its child <firstname>, <lastname>, <nickname>, and <marks> by iterating over each student. It checks key as firstname to be present and then prints the student details, otherwise displays an error message.