[Po4a-commits] "po4a/lib/Locale/Po4a Sgml.pm,1.117,1.118"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Mon Oct 23 23:46:21 CEST 2006
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv5463/lib/Locale/Po4a
Modified Files:
Sgml.pm
Log Message:
When an xml prologue (<?xml ...?>) is detected, consider '/>' as the end
of XML empty tag (not an SGML '/' tag closure followed by an '>' character).
Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- Sgml.pm 22 Oct 2006 18:49:06 -0000 1.117
+++ Sgml.pm 23 Oct 2006 21:46:17 -0000 1.118
@@ -749,6 +749,9 @@
}
}
$origfile=~s/\G(.*?)&([A-Za-z_:][-_:.A-Za-z0-9]*|#[0-9]+|#x[0-9a-fA-F]+)\b/$1\{PO4A-amp\}$2/gs;
+ if (defined($xmlprolog) && length($xmlprolog)) {
+ $origfile=~s/\/>/\{PO4A-close\}>/gs;
+ }
if ($debug{'refs'}) {
print "XX Resulting shifts\n";
@@ -1086,6 +1089,10 @@
}
$lastchar = substr($cdata, -1, 1);
$buffer .= $cdata;
+ if (defined($xmlprolog) && length($xmlprolog)) {
+ $buffer =~ s/>PO4A-close\}>/\/>/sg;
+ $buffer =~ s/PO4A-close\}>//sg; # This should not be necessary
+ }
} # end of type eq 'cdata'
elsif ($event->type eq 'sdata') {
More information about the Po4a-commits
mailing list