xsl-list
[Top] [All Lists]

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

2010-10-14 02:34:30

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--