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)
>       else:
>           # 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.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to