Administration > XSL Stylesheets > XSL Stylesheet Error Handling using xsl:message
XSL Stylesheet Error Handling using xsl:message
You can use the xsl:message element in your XSL stylesheet to troubleshoot problems. The XSLT processor sends xsl:message output to standard output. You must activate the Java Console to see xsl:message output.
You can activate the Java Console in the following ways:
Opening a Java Console from the Tools menu (Tools > Java Console).
Calling the java_console function.
<xsl:template name="process.image">
<!-- When this template is called, the current node should be -->
<!-- a graphic, inlinegraphic, imagedata, or videodata. All -->
<!-- those elements have the same set of attributes, so we -->
<!-- can handle them all in one place. -->
<xsl:param name="tag" select="'img'"/>
<xsl:param name="alt"/>
<xsl:variable name="input-filename">
<xsl:when test="@entityref">
<xsl:value-of select="unparsed-entity-uri(@entityref)"/>
<xsl:when test="@fileref">
<xsl:value-of select="@fileref"/>
<xsl:text>Expected @entityref or @fileref on
<xsl:value-of select="name(.)"/>