I'm trying to use the saxon:catch instruction for the first time, and I don't think it is doing anything.

I'm using oXygen and using Saxon-EE

I copied the example from the saxon documentation for Saxon:try into a bare stylesheet:

<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    exclude-result-prefixes="xs xdt udf saxon math fn err exsl date">

    <xsl:template match="/">

<xsl:variable name="input-uri" select="'nofile'"/>
        <saxon:try select="document($input-uri)"> <saxon:catch errors="*"> <xsl:document> <error-document/> </xsl:document> </saxon:catch> </saxon:try>


I expected a synamic error since there is file with the name 'nofile".

Instead, it looks like the processor did not recognize this instruction as a saxon extension:

<?xml version="1.0" encoding="UTF-8"?><saxon:try xmlns:saxon="http://saxon.sf.net/" select="document($input-uri)"><saxon:catch errors="*"><error-document/></saxon:catch></saxon:try>

I was surprised to see the "xmlns:saxon="http://saxon.sf.net/"" annotation here given that I had excluded the saxon result prefix.

Is it possible that, for this extension, the "Version='3.0'" attribute is not sufficient to trigger the enhanced support? I know that in previous releases of Saxon some of the advanced features could not be triggered by using "Version = 3.0" when not called by the command line.



"A false conclusion, once arrived at and widely accepted is not dislodged easily, and the less it is understood, the more tenaciously it is held." - Cantor's Law of Preservation of Ignorance.