[xml/sgml-pkgs] Bug#561658: libexpat1 patch breaks xhtml parsing with a local http doctype definition
Tuomas Venhola
tuomas.venhola at koripallo.com
Fri Dec 18 10:43:12 UTC 2009
Package: libexpat1
Version: 1.95.8-3.4+etch2_i386
After upgrading libexpat1 my perl script which used XPath ceased
functioning. Downgrading back to 1.95.8-3.4+etch1 fixed the problem,
meaning the bug was introduced with the patch. I'm using local copy of
the doctype definition as seen below.
error in processing external entity reference at line 1, column 117,
byte 117:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.koripallo.com/dtd/xhtml1-transitional.dtd">
======================================================================================
==============================^
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head></head>
at /usr/lib/perl5/XML/Parser.pm line 187
A small perl script to reproduce the bug (this works in etch1 patch, but
not in etch2)
#!/usr/bin/perl
use strict;
use DBI;
use DBD::mysql;
use Text::Iconv;
use Getopt::Long;
use Net::HTTP;
use XML::XPath;
use XML::XPath::XMLParser;
my $document = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.koripallo.com/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head></head>
<body></body></html>';
my $xp = XML::XPath->new(xml => $document);
my $nodeset = $xp->find('/html/body');
print "Works.\n";
More information about the debian-xml-sgml-pkgs
mailing list