XSLT <xsl:message> ElementThe XSLT <xsl:message> element is used to display the error message and help to debug the XSLT processing. It is similar to JavaScript alerts. This element buffers a message to XSLT processor which terminates the processing and sends a message to the caller application to show an error message. Parameter explanationTerminate: It specifies if the transformation should terminate upon executing this instruction or not. When the terminate attribute 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. By default value is ?no?. XSLT <xsl:message> Element ExampleFor "yes" ConditionLet's take an example to create a <student> element with its attribute "id" and its child <firstname>, <lastname>, <nickname>, and <salary> by iterating over each employee. It checks key as firstname to be present and then prints the employee's details, otherwise displays an error message. Employee.xml Employee.xsl Output: For "no" ConditionEmployee.xsl Output: Next Topic# |