[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.31,1.32"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sun Nov 27 20:42:18 UTC 2005
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv30744/lib/Locale/Po4a
Modified Files:
Xml.pm
Log Message:
If the XML declaration has a standalone document declaration, the encoding
must not be appended. The XML declaration specification is:
http://www.w3.org/TR/REC-xml/#NT-XMLDecl
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- Xml.pm 19 Nov 2005 20:30:54 -0000 1.31
+++ Xml.pm 27 Nov 2005 20:42:16 -0000 1.32
@@ -401,7 +401,11 @@
if (defined $in_charset) {
$tag =~ s/$in_charset/$out_charset/;
} else {
- $tag.= " encoding=\"$out_charset\"";
+ if ($tag =~ m/standalone/) {
+ $tag =~ s/(standalone)/encoding="$out_charset" $1/;
+ } else {
+ $tag.= " encoding=\"$out_charset\"";
+ }
}
return $tag;
More information about the Po4a-commits
mailing list