Re: [xml] SAX2 / empty namespace issue

On Wed, Jun 15, 2005 at 09:35:05PM +1000, Michael Day wrote:

Hi Daniel,

  yes, please. If it can't be reproduced with the existing test tools
please provide a standalone C program, and the instance. We have the
instance so that is okay :-)

Here is a short C program that exhibits the problem:


#include <libxml/parser.h>

void func(void *foo, xmlErrorPtr err)

int main()
    xmlDocPtr doc;

    xmlSAXHandlerPtr sax = (xmlSAXHandlerPtr) &xmlDefaultSAXHandler;

    xmlSetStructuredErrorFunc(&doc, func);

    doc = xmlSAXParseFileWithData(sax, "dummy.xml", 0, NULL);

    return 0;


When run on this instance document:

    <foo xmlns:null=""/>

the structured error handler will never be called, and running it under
valgrind shows up some errors.

If no structured error handler is set then the correct namespace error
message is printed and valgrind says no errors.

  The bug is that SAX2.c continues to call directly ctxt->sax->error and
ctxt->sax->warning instead of using the global __xmlRaiseError() framework.
This is a bug. Could you put it in bugzilla to make sure we don't loose
track of it ?

   thanks !


Daniel Veillard      | Red Hat Desktop team
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]