Re: [xsl] Unicode character decimal representation problem when copying the XML

Subject: Re: [xsl] Unicode character decimal representation problem when copying the XML
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Thu, 14 Oct 2010 08:34:18 +0100
First I tried to do the following:

<xsl:variable name="test-for-saxon-extensions"
select="concat(function-available('saxon:parse'),
function-available('saxon:serialize'))" />
<xsl:if test="$test-for-saxon-extensions ne 'truetrue'">
  <xsl:message terminate="yes" select="'You must use Saxon-EE |
Saxon-PE | Saxon-9.2 | Saxon-9.1'"/>
</xsl:if>

It normally works but because of the way I have organized the
stylesheet, Saxon  shows its error message long before the
transformation is stoped by xsl:message.


Saxon will attempt to bind functions at compile time, and gives a compile-time error message if they can't be found. If you want to get in first, put the function-available test in a use-when attribute on an element containing the relevant extension function call.


Michael Kay
Saxonica

Current Thread