Re: [xml] strange transformCtxt free-ing problem

On Sun, Jan 14, 2007 at 02:40:49PM +0000, Nic James Ferrier wrote:
I've got a document loader implemented in python that handles xml or
html documents thus:

  if re.match("^[a-z]+://.*", url):
      cached_file, header = hapi_lib.httputils.url_retrieve(url)
      if header["content-type"] == "text/html":
           doc = parserContext.htmlCtxtReadFile(cached_file, "UTF8", 0)
          # Guess that it's XML
          doc = parserContext.ctxtReadFile(cached_file, "UTF8", 0)

The HTML works fine until I come to free the transformContext that
this is all done within.

When I do I get a glibc error and my process segfaults.

  How do you free it ? And what how is that piece of code related to a
transformContext, I don't see any ?!? A transformation context made from
a document consumes the XSLT document, if you free it it will die when
python reclain the transformation context. But I see no relationship to
HTML or XML parsing of *transformed* document.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]