Re: libxml2 python error messages
Daniel Veillard <[email protected]> Mon, 23 Sep 2002 09:30:20 -0400
| Newsgroups | gmane.comp.gnome.lib.xml.bindings |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Sep 23, 2002 at 01:32:50PM +0200, [email protected] wrote: > On Mon, Sep 23, 2002 at 12:55:57PM +0200, Jean-Baptiste Quenot wrote: > > * Daniel Veillard: > > > > I'm using intensively the Python bindings for libxml2 and libxslt. > > > > The major problem I encounter is that error messages are written to > > > > stdout while I'm running in CGI mode: it breaks the HTTP response. > > > > How could I suppress output of errors in stdout? I noticed that > > > > changing the > > > > > > What kind of error message. Can you chexk the examples, you can > > > redirrect the error messages to your own handler. > > > > It's okay now. I had to provide one also for libxslt to get it working > > though. Is it normal behaviour? I have to register the callback for > > both libraries to handle error messages (even for errors coming from > > libxml2 only). Hum, strange, I can't think of any reason for this except maybe libxslt initialization potentially resetting the libxml2 error handler. > > I mean saving the result of the XSL transformation to a string, but IIRC > > it is on your TODO list. the TODO may not be up to date... > You need to save the result of an XSL transformation to a python string? > There _is_ a function 'saveResultToString' in the libxslt python bindings > (at least there _should_ be, i've written one and AFAIK Daniel applied the > patches. There should be even a small sample/testcase in $LIBXSLT/python/tests/basic.py). yup. Some of the informations from the stylesheet are needed to correctly serialize the resulting document. Daniel -- Daniel Veillard | Red Hat Network https://rhn.redhat.com/ [email protected] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/