- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 06 Jan 2009 21:12:08 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv14709 Modified Files: check Log Message: Cosmetic cleanups, NFC. Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.630 retrieving revision 1.631 diff -u -d -r1.630 -r1.631 --- check 4 Jan 2009 22:12:15 -0000 1.630 +++ check 6 Jan 2009 21:12:06 -0000 1.631 @@ -1013,7 +1013,7 @@ if (&is_xml($File) and not $File->{DOCTYPE} and lc($File->{Root}) ne 'html') { $File->{Version} = 'XML'; } else { - $File->{Version} = $File->{DOCTYPE} unless $File->{Version}; + $File->{Version} ||= $File->{DOCTYPE}; } # @@ -1762,13 +1762,13 @@ } $dtd .= '>'; - local $org_dtd = ''; - local $HTML = ''; - local $seen = FALSE; - local $seen_root = FALSE; + local $org_dtd = ''; + local $HTML = ''; + local $seen_doctype = FALSE; + local $seen_root = FALSE; my $declaration = sub { - $seen = TRUE; + $seen_doctype = TRUE; $org_dtd = &ent($_[0]); ($File->{Root}, $File->{DOCTYPE}) = $_[0] =~ m(<!DOCTYPE\s+(\w[\w\.-]+)\s+(?:PUBLIC|SYSTEM)\s+(?:[\'\"])([^\"\']+)(?:[\"\']).*>)si; @@ -1786,7 +1786,7 @@ } else { $seen_root = TRUE; - if ($seen) { + if ($seen_doctype) { # doctype addition aldready done, we move on $HTML .= $_[0]; } @@ -1805,7 +1805,7 @@ $File->{Content} = [split /\n/, $HTML]; - if ($seen) { + if ($seen_doctype) { unless (($File->{Opt}->{FB}->{DOCTYPE}) or ($File->{Opt}->{DOCTYPE} eq $CFG->{Types}->{$File->{DOCTYPE}}->{Display} )) { &add_warning('W13', { W13_org => $org_dtd,
Received on Tuesday, 6 January 2009 21:12:16 UTC