xsl-list
[Top] [All Lists]

Re: [xsl] saxon:try()

2008-01-04 07:39:45
"Florent" == Florent Georges <lists(_at_)fgeorges(_dot_)org> writes:


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

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

But that goes against the declarative nature of XSLT.

xsl:variable declares the definition of a value. It doesn't indicate
execution at all.

The reference to the variable, which is inside the ex:try, is the
most logical place to think of the evaluation occuring. Or rather, it
is the place at which you access the value. 

If you DIDN'T access the variable within the transformation at all,
when should the error be raised? Prior to the execution of the initial
template? That would be a bit harsh.
-- 
Colin Adams
Preston Lancashire

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>