Re: [xslt] python xslt messages
- From: Sam Brauer <sam webslingerZ com>
- To: <xslt gnome org>
- Subject: Re: [xslt] python xslt messages
- Date: Fri, 12 Apr 2002 07:25:32 -0400 (EDT)
On Fri, 12 Apr 2002, Daniel Veillard wrote:
> On Fri, Apr 12, 2002 at 06:46:13AM -0400, Sam Brauer wrote:
> > I've been happily using the Python libxslt interface for a few weeks
> > now, but I have noticed that sometimes there are error messsages written
> > to stderr (for example, when a variable is referred to but was never
> > declared, or when an xpath expression cannot be evaluated). However no
> > exceptions are thrown and I get a results back from
> > parseStylesheetDoc() and applyStylesheet(), as if everything succeeded.
> >
> > Is there some way via Python to access the warning/error messages (other
> > than redirecting stderr) ?
>
> Have you tried
> libxml2.registerErrorHandler(your_function, your_context) ?
>
> Generating exceptions would need to build a bit more Python glue around
> the existing wrappers to check the error code and raise an exception
> if detected.
>
> Daniel
>
>
I haven't tried that, but I will :)
So that handles errors generated by libxslt too?
--
Sam Brauer
Systems Programmer
sam@webslingerZ.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]