·  XSLT – Elements – <xsl:message>

 

- Info :

  - If parameter 'terminate' is 'yes', error page with text is displayed.

 

- Example:

 

    test.xml

    <?xml version="1.0"?>

    <?xml-stylesheet type="text/xsl" href="test.xsl"?>

    

    <people>

      <student>

        <name>Jack  </name>

        <name>Junior</name>

        <age >23    </age>

      </student>

    </people>

    

    test.xsl

    <?xml version="1.0" ?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    

      <xsl:template match="/">      

        <xsl:message terminate="yes">

          This is some error message.

        </xsl:message>

      </xsl:template>

      

    </xsl:stylesheet>

    

    result

    The XML page cannot be displayed

    

    Cannot view XML input using XSL style sheet. Please correct the error

    and then click the Refresh button, or try again later.

      


    This is some error message.