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

validator/httpd/cgi-bin check,1.422,1.423

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 20 Jun 2005 08:11:46 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1DkHNi-000808-ES@lionel-hutz.w3.org>

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

Modified Files:
	check 
Log Message:

Cleaning up a variable overload bug. A piece of (old) code trolls the ESIS
for version attributes, as a way, among other things, to see whether the parser
has used a fallback doctype. Keeping this functionality, but removing the part where 
the (important File->{Version} would be overwritten.

See also:
http://lists.w3.org/Archives/Public/public-qa-dev/2005Jun/thread.html#3


Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.422
retrieving revision 1.423
diff -u -d -r1.422 -r1.423
--- check	3 Jun 2005 05:03:28 -0000	1.422
+++ check	20 Jun 2005 08:11:44 -0000	1.423
@@ -754,13 +754,12 @@
   for (@{$File->{ESIS}}) {
     no warnings 'uninitialized';
     next unless /^AVERSION CDATA (.*)/i;
+    push @{$File->{Version_ESIS}}, $1;
     if ($1 =~ '-//W3C//DTD (SGML|XML) Fallback//EN') {
       $File->{Tentative} |= (T_ERROR | T_FALL);
       my $dtd = $1 eq 'SGML' ? 'HTML 4.01 Transitional' : 'XHTML 1.0 Strict';
       &add_warning('W09', { W09_dtd => $dtd });
     }
-    $File->{Version} = $1;
-    last;
   }
 
   return $File;
@@ -816,8 +815,9 @@
   
   
   
-  if (! $File->{Doctype} and ($File->{Version} eq 'unknown' or $File->{Version} eq 'SGML')) {
-      $T->param(file_version => '(no Doctype found)');
+  if (! $File->{Doctype} and ($File->{Version} eq 'unknown' or $File->{Version} eq 'SGML' or (!$File->{Version}))) {
+    # @@TODO@@ we should try falling back on other version info, such as the ones stored in Version_ESIS 
+    $T->param(file_version => '(no Doctype found)');
   }
   else {
     $T->param(file_version => $File->{Version});
Received on Monday, 20 June 2005 08:11:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:20 UTC