Saturday, June 30, 2007

Error handling extension for XSLT 2.0

I finally wrote a few words about the try/catch extension I wrote for Saxon a couple of months ago (see this and this entries). You can find the project page there:

I also wrote a first draft of a specification for such an extension. There are some differences between this and the actual implementation for Saxon, but the spirit remains the same. It can be found there:

I don't know if the EXSLT project is open to extensions for XSLT 2.0. I think that would be worth having an error handling extension defined in such a vendor-neutral project. I'm indeed interested in any comments about this extension and its specification.

Labels: ,


Anonymous Anonymous said...

I've found out that org.fgeorges.exslt2.saxon.CurrentError class is not thread aware, as you're using static variable to track exception stack (for all threads).

I guess you need to add XPathContext to you functions as first argument, and store your data in Controller's user data.

Blogger Florent Georges said...

Hi Vladimir,

Yes you're right. I was not happy with the fact that CurrentError was using static stuff. But I never took the time to think about it.

Thanks for the hint, at first glance that seems to be the right way!

Regards, -- Florent


Post a Comment

<< Home