Re: [xml] SAX2 / empty namespace issue




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)
{
    printf("error\n");
}

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.

Cheers,

Michael

-- 
YesLogic Prince prints XML!
http://yeslogic.com



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