validator/httpd/cgi-bin check,1.305.2.147,1.305.2.148

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv31454/httpd/cgi-bin

Modified Files:
      Tag: validator-0_6_0-branch
	check 
Log Message:
Applying Nick's DOCTYPE Fallback patch.


Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.305.2.147
retrieving revision 1.305.2.148
diff -u -d -r1.305.2.147 -r1.305.2.148
--- check	24 Jun 2004 19:33:30 -0000	1.305.2.147
+++ check	21 Jul 2004 10:24:06 -0000	1.305.2.148
@@ -76,6 +76,7 @@
 use constant T_WARN  =>  4; # 0000 0100
 use constant T_ERROR =>  8; # 0000 1000
 use constant T_FATAL => 16; # 0001 0000
+use constant T_FALL  => 32; # 0010 0000, Fallback in effect.
 
 #
 # Output flags for error processing
@@ -767,6 +768,18 @@
   for (@{$File->{ESIS}}) {
     no warnings 'uninitialized';
     next unless /^AVERSION CDATA (.*)/;
+    if ($1 eq '-//W3C//DTD HTML Fallback//EN') {
+      $File->{Tentative} |= (T_ERROR | T_FALL);
+      &add_warning($File, 'fallback', 'DOCTYPE Fallback in effect!', <<".EOF.");
+      The DOCTYPE Declaration in your document was not recognized. 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
+      that closely resembles HTML 4.01 Transitional, but the document will not
+      be Valid until you have corrected the problem with the DOCTYPE
+      Declaration.
+.EOF.
+    }
     $File->{Version} = $1;
     last;
   }

Received on Wednesday, 21 July 2004 06:24:48 UTC