Subject: | XML::LibXML chokes on SVG standalone output |
Date: | Mon, 15 Dec 2008 19:16:00 +0100 |
To: | bug-SVG [...] rt.cpan.org |
From: | Lutz Gehlen <lutz.gehlen [...] gmx.de> |
Dear Ronan,
I have recently upgraded to version 2.44 of SVG (unfortunately, I do
not know from which earlier version) and the error is reproducable
with version 2.45. When feeding the output of 'xmlify' into
XML::LibXML (version 1.62). I get the following error:
---
:3: validity error : standalone: attribute preserveAspectRatio on
svg defaulted from external subset
mlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
---
This did not happen before. The error can be circumvented by
disabling 'standalone'. The following code reproduces the problem:
use SVG;
use XML::LibXML;
print "$SVG::VERSION\n";
print "$XML::LibXML::VERSION\n";
my $svg = SVG->new(width => 400, height => 300);
my $parser = XML::LibXML->new;
eval { $parser->parse_string($svg->xmlify) };
print $@ || "Hooray\n";
eval { $parser->parse_string($svg->xmlify('-standalone' => 'no')) };
print $@ || "Hooray\n";
Best regards,
Lutz