List Info

Thread: Re: strange transformCtxt free-ing problem




Re: strange transformCtxt free-ing problem
user name
2007-01-15 07:31:55
Daniel Veillard <veillardredhat.com> writes:

> Nic said:
>>  *** glibc detected *** double free or corruption
(!prev): 0x081b6300 ***
>>  Aborted
>> 
>   But did you update libxslt too and make install for
it too ? Please do
> he fixed the problems in libxslt not in libxml2,

Ah!

Yes. It stopped segfaulting. I can't get it to parse the
HTML... but
it has stopped segfaulting.

  doc.dump(sys.stdout)

shows this for every document I get back that parses:

<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN" "h
ttp://www.w3.org/TR/REC-html40/loose.dtd">

Here's the relevant bit of the loader again:

  def loader(url, pctx, ctx, type):
      doc = None
      context_object = None
      if type:
          context_object = libxslt.stylesheet(_obj=ctx)
      else:
          context_object = libxslt.transformCtxt(_obj=ctx)
      # The parserContext and resulting document
      parserContext = libxml2.parserCtxt(_obj=pctx)
      doc = None
      if url == "/one":
          doc =
parserContext.htmlCtxtReadFile("file2.html",
"UTF8", 1)
      else:
          doc =
parserContext.ctxtReadDoc("""<document>

  <h1>this is xml</h1>
  </document>""", url,
"UTF8", 0)
      return doc


so when I ask for "/one" from my stylesheet I get
back (practically)
nothing.

-- 
Nic Ferrier
http://www.tapsellfer
rier.co.uk   for all your tapsell ferrier needs
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )