Re: [xsl] saxon:try()

Subject: Re: [xsl] saxon:try()
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Fri, 4 Jan 2008 15:22:42 +0100 (CET)
Colin Paul Adams wrote:

> >>>>> "Florent" == Florent Georges <lists@xxxxxxxxxxxx> writes:

>     Florent> 
> http://www.fgeorges.org/xslt/error-safe/error-safe.html

> This is quite interesting.

> Why do you say that the FOAR0001 error shouldn't be
> caught? XSLT doesn't define the order of execution, so it
> seems reasonable to me that the error is caught.

  Yes, this is why the error is caught, because Saxon
doesn't execute the instructions in the same order as in
their lexical representation within the stylesheet (and
that's a good thing, that's what enables lazy evaluation of
variables).

  But I think that the ex:error-safe instruction should be
exactly predictable, deterministic.  If an expression stands
lexically outside of the instruction, if it produces an
exception, it shouldn't be caught (but that's only my humble
point of view).

  The drawback is that the instruction could then be a
border for several optimization opportunities...

  So the answer to your question is "because it is defined
as such", but this is only a personal draft for a personal
extension :-).

  Regards,

--drkm























      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr

Current Thread