[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.58,1.59"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Thu Feb 14 16:53:18 UTC 2008
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv5704/lib/Locale/Po4a
Modified Files:
Xml.pm
Log Message:
Also handle tag's attribute without value with the ontagerror option.
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- Xml.pm 20 Jan 2008 16:52:47 -0000 1.58
+++ Xml.pm 14 Feb 2008 16:53:16 -0000 1.59
@@ -218,7 +218,8 @@
=item ontagerror
This option defines the behavior of the module when it encounter a invalid
-closing tag (a tag is closed, which does not match the last opening tag).
+Xml syntax (a closing tag which does not match the last opening tag, or a
+tag's attribute without value).
It can take the following values:
=over
@@ -1023,8 +1024,14 @@
}
}
- die wrap_ref_mod($ref, "po4a::xml", dgettext ("po4a", "Bad attribute syntax"))
- unless ($complete);
+ unless ($complete) {
+ my $ontagerror = $self->{options}{'ontagerror'};
+ if ($ontagerror eq "warn") {
+ warn wrap_ref_mod($ref, "po4a::xml", dgettext ("po4a", "Bad attribute syntax. Continuing..."));
+ } elsif ($ontagerror ne "silent") {
+ die wrap_ref_mod($ref, "po4a::xml", dgettext ("po4a", "Bad attribute syntax"));
+ }
+ }
}
}
return $text;
More information about the Po4a-commits
mailing list