- From: Terje Bless <link@dev.w3.org>
- Date: Fri, 04 Feb 2005 19:01:01 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv6205/httpd/cgi-bin
Modified Files:
check
Log Message:
Sanity check error messages, and remove hardcoded references to HTML 4.01.
This finally closes Bug #752 and Bug #980.
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.381
retrieving revision 1.382
diff -u -d -r1.381 -r1.382
--- check 4 Feb 2005 18:40:59 -0000 1.381
+++ check 4 Feb 2005 19:00:59 -0000 1.382
@@ -880,7 +880,7 @@
$File->{Tentative} |= (T_ERROR | T_FALL);
my $dtd = $1 eq 'SGML' ? 'HTML 4.01 Transitional' : 'XHTML 1.0 Strict';
&add_warning($File, 'fallback', 'DOCTYPE Fallback in effect!', <<".EOF.");
- The DOCTYPE Declaration in your document was not recognized. This
+ The DOCTYPE Declaration was not recognized or is missing. This
probably means that the Formal Public Identifier contains a spelling
error, or that the Declaration is not using correct syntax. Validation
has been performed using a default "fallback" Document Type Definition
@@ -1704,13 +1704,15 @@
# No DOCTYPE.
if ($err->{msg} =~ m(prolog can\'t be omitted)) {
+ my $dtd = ($File->{Mode} == MODE_SGML ?
+ 'HTML 4.01 Transitional' : 'XHTML 1.0 Transitional');
my $class = 'fatal';
- my $title = 'No DOCTYPE Found! Falling Back to HTML 4.01 Transitional';
+ my $title = "No DOCTYPE Found! Falling Back to $dtd";
my $message = <<".EOF.";
<p>
A DOCTYPE Declaration is mandatory for most current markup languages
and without one it is impossible to reliably validate this document.
- I am falling back to "HTML 4.01 Transitional" and will attempt to
+ I am falling back to "$dtd" and will attempt to
validate the document anyway, but this is very likely to produce
spurious error messages for most non-trivial documents.
</p>
Received on Friday, 4 February 2005 19:01:02 UTC