Ah, thanks...I guess most of the saxon extensions I have used have been extensions to the xpath function library, not extension elements.

-David


On Thu, Dec 12, 2013 at 11:18 PM, Michael Kay <mike@saxonica.com> wrote:
Two problems here

(1) saxon:try / saxon:catch were superseded by xsl:try / xsl:catch. See the first paragraph at

http://www.saxonica.com/documentation/#!changes/extensions/9.4-9.5

(2) the Saxon namespace isn't declared in "extension-element-prefixes", so it's not recognized as an (absent) extension element, and is rather treated as a literal result element. 

Michael Kay
Saxonica



On 12 Dec 2013, at 20:12, David Rudel <fwqhgads@gmail.com> wrote:

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 9.5.1.2

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"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:udf="user-defined"
    xmlns:fn="http://www.w3.org/2005/xpath-functions"
    xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"
    xmlns:err="http://www.w3.org/2005/xqt-errors"
    xmlns:math="http://exslt.org/math"
    xmlns:saxon="http://saxon.sf.net/"
    xmlns:exsl="http://exslt.org/common"
    xmlns:date="http://exslt.org/dates-and-times"
    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>
       
    </xsl:template>

</xsl:stylesheet>

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.

-David

--

"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.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help



--

"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.