
Paul Everitt wrote: [snip]
BTW, I had pretty good luck yesterday with XSLT parameters. I did both the string and XPath.
[snip]
In the course of doing this, I found (I think) that the error reported when something is wrong with your parameters is a bit misleading. IIRC, it was NameError: XSLTApply or something.
Thanks for testing this. Hey, I thought I fixed this NameError, I even have a test for it, can you still get this with recent checkouts? You do get an XSLTApplyError that's singularly uninformative if you do something wrong with parameters. This is part of a general problem right now with lxml and error handling. I brutally suppress all libxml2 errors, as it otherwise it tends to spam you to death. In fact, my brutal surpression isn't fully effective as it still tends to spam you when you start up another thread (but I know that's fixable, just haven't gotten around to it). What in fact needs to happen is some clever interfacing with libxml2 so that its frequently useful output is caught and presented to the programmer in some fairly nice way that works well with Python. What that should be, and what the details of such interfacing with libxml2 would look like, I'm not entirely sure about yet. It will be a fairly involved project to start tackling this, though hopefully straightforward enough to write once I or someone else figures out the basics. Regards, Martijn