[xml] ctxt->sax->fatalError never beging used



Hi Daniel, All,

I wonder why the sax fatalError callback is never called even for fatal 
errors. I would assume the corresponding code in __xmlRaiseError to look 
something like:

if (level == XML_ERR_WARNING)
            channel = ctxt->sax->warning;
        else if (level == XML_ERR_FATAL)
            channel = ctxt->sax->fatalError;
        else
            channel = ctxt->sax->error;

while it currently only looks like:

if (level == XML_ERR_WARNING)
            channel = ctxt->sax->warning;
        else
            channel = ctxt->sax->error;

Is there an intention in this?

I'm asking because we map these callbacks to Perl-level SAX callbacks in the 
Perl XML::LibXML SAX binding. I need fatalError Perl callback to be called on 
a fatal error in order to be consistent with other SAX-based parser 
interfaces in Perl.

Thanks,

-- Petr



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