|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: saxon:try()
> 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. You can do it that way - treating a variable reference rather like a function call - but it gets difficult if one reference to a variable is inside a try/catch and another isn't (or is in a different try/catch). Do you catch the error twice? I think it's easier to use the more conventional model where the variable is treated as if it is eagerly evaluated. That doesn't actually stop lazy evaluation internally - you just have to make the try/catch environment of an expression part of the closure that you retain until the evaluation is performed, just as you retain the other parts of its context already. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







