Re: bug in XML::LibXML::Error 1.69_1: "int1, int2, int3" becomes "num1, num2, num3"

On 6-Feb-09, at 10:35 AM, Petr Pajas wrote:
> So looking at libxml2 code (error.c) it seems that the generic  
> handler does
> its own computation of the column number while selecting the context  
> of the
> source XML to print (see xmlParserPrintFileContextInternal). The  
> value passed
> to the structured handler is obtained from the input buffer and  
> seems to be
> inaccurate/approximate.
>
> So a did what xmlParserPrintFileContextInternal does and added two  
> fields:
> $@->context() returns a string with the XML surrounding the error and
> $@->column() returns the offset in this string. This is now in SVN,
> I'll make another developers release soon. These values are used in
> serialization code ("$@") so that now XML::LibXML hopefully produces  
> the
> exact same error messages as xmllint.

This is perfect, thanks Petr. Looking forward to the release.

-- 
olivier

Received on Friday, 6 February 2009 15:45:06 UTC