W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2005

validator/httpd/cgi-bin check,1.381,1.382

From: Terje Bless <link@dev.w3.org>
Date: Fri, 04 Feb 2005 19:01:01 +0000
To: www-validator-cvs@w3.org
Message-ID: <E1Cx8hR-0001uw-Mb@lionel-hutz.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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:48 GMT