[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.89,1.90"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sun Feb 22 10:04:47 UTC 2009


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv3819/lib/Locale/Po4a

Modified Files:
	Xml.pm 
Log Message:
	* NEWS, lib/Locale/Po4a/Xml.pm: Only issue a warning when the
	doctype does not match. Also provide more help to the users.


Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- Xml.pm	13 Feb 2009 22:19:10 -0000	1.89
+++ Xml.pm	22 Feb 2009 10:04:45 -0000	1.90
@@ -621,7 +621,6 @@
 }
 
 sub tag_extract_doctype {
-#TODO
 	my ($self,$remove)=(shift,shift);
 
 	# Check if there is an internal subset (between []).
@@ -643,12 +642,13 @@
 }
 
 sub tag_trans_doctype {
-#TODO
+# This check is not really reliable.  There are system and public
+# identifiers.  Only the public one could be checked reliably.
 	my ($self, at tag)=@_;
 	if (defined $self->{options}{'doctype'} ) {
 		my $doctype = $self->{options}{'doctype'};
 		if ( $tag[0] !~ /\Q$doctype\E/i ) {
-			die wrap_ref_mod($tag[1], "po4a::xml", dgettext("po4a", "Bad document type. '%s' expected."), $doctype);
+			warn wrap_ref_mod($tag[1], "po4a::xml", dgettext("po4a", "Bad document type. '%s' expected. You can fix this warning with a -o doctype option, or ignore this check with -o doctype=\"\"."), $doctype);
 		}
 	}
 	my $i = 0;




More information about the Po4a-commits mailing list