W3C home > Mailing lists > Public > public-qa-dev@w3.org > February 2009

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

From: olivier Thereaux <ot@w3.org>
Date: Thu, 5 Feb 2009 16:51:26 -0500
Cc: "public-qa-dev@w3.org list" <public-qa-dev@w3.org>, Karl Dubost <karl+w3c@la-grange.net>
Message-Id: <AA4B49B8-BE4A-47D1-8E12-926B0FC30103@w3.org>
To: Petr Pajas <pajas@ufal.mff.cuni.cz>

Hi Petr,

Playing with the libxml2 structured API today, thanks to your recent  
developer release 1.69_1 of XML::LibXML::Error, I noticed a  
discrepancy in your code: int1() int2() and int3() were actually  
implemented as num1() num2() num3().


* http://xmlsoft.org/html/libxml-xmlerror.html mentions int1, int2, int3

* http://search.cpan.org/~pajas/XML-LibXML-1.69_1/lib/XML/LibXML/Error.pod 
  too mentions int1, int2, int3

* http://cpansearch.perl.org/src/PAJAS/XML-LibXML-1.69_1/lib/XML/LibXML/Error.pm 
  uses 	num1 => $xE->num1(), etc.
and a dump of the object shows usage of num1, num2... etc

$error = bless( { 'num1' => 0, 'file' => '', 'message' => 'attributes  
construct error ', 'domain' => 1, 'level' => 3, 'str2' => undef,  
'_prev' => undef, 'str1' => undef, 'str3' => undef, 'num2' => 10,  
'code' => 65, 'line' => 8 }, 'XML::LibXML::Error' );

I think this may be a mistake. Could you confirm?


A suggested addition to the POD documentation: according to http://xmlsoft.org/html/libxml-xmlerror.html 
  the int2 ariable is supposed to be the column where the error was  
found. Knowing that is very useful.


However, in the case of the error I just dumped above, I am surprised  
that int2/num2 seems to actually be wrong. Indeed, 'num2' => 10 where  
the "old" version of lbxml2 shows the error around column 15. Is that  
a bug too?


My test case is http://qa-dev.w3.org/wmvs/HEAD/dev/tests/2689-attribute-no-space.xhtml
feel free to use it, of course.

Thanks,
-- 
olivier
Received on Thursday, 5 February 2009 21:51:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 19 August 2010 18:12:49 GMT