[lxml-dev] xslt exceptions
Stefan Behnel
stefan_ml at behnel.de
Wed Jul 4 23:42:16 CEST 2007
Hi,
Roger Patterson wrote:
> I am getting errors from within an XPath call within a custom extension
> being called while doing an XSLT transform.
> I am able to access the global error log as well as the error_log on the
> transform object, but the error information is sketchy at best.
> Unfortunately no exception is being thrown. Is this normal? Is there a
> way of turning on exception throwing?
Hmm, if I understand that right, what you do is: from an XSLT, you call into a
Python extension function and from that you call an XPath expression. This
expressions fails and you want to do what?
* stop XSLT execution and propagate the error? Then throw an exception yourself.
* know why it failed? The XPath code has had a major refactoring on the
current SVN trunk that will become lxml 2.0. The XPath class now has its own
error log and may even throw a meaningful exception for you.
I encourage you to check out the trunk and try it out. Any comments are
appreciated.
http://codespeak.net/svn/lxml/trunk/
Stefan
More information about the lxml-dev
mailing list