diff options
-rwxr-xr-x | httpd/cgi-bin/check | 14 | ||||
-rw-r--r-- | share/templates/en_US/warnings.tmpl | 19 |
2 files changed, 28 insertions, 5 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 2bc34ae..3706bb7 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.581 2008-01-17 11:23:25 ot Exp $ +# $Id: check,v 1.582 2008-02-12 06:30:25 ot Exp $ # # Disable buffering on STDOUT! @@ -186,7 +186,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.581 $; + $VERSION = q$Revision: 1.582 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1892,6 +1892,16 @@ sub match_DTD_FPI_SI { } } } + else { # FPI not know, checking if the SI is + foreach my $proper_FPI (keys %{$CFG->{Types}}) { + if ($CFG->{Types}->{$proper_FPI}->{SysID} eq $SI) { + &add_warning('W26', {W26_dtd_pub => $FPI, + W26_dtd_pub_display =>$CFG->{Types}->{$proper_FPI}->{Display}, + W26_dtd_sys => $SI, + W26_dtd_pub_recommend=> $proper_FPI }); + } + } + } } # # Do an initial parse of the Document Entity to extract FPI. diff --git a/share/templates/en_US/warnings.tmpl b/share/templates/en_US/warnings.tmpl index 9b7d288..a457b16 100644 --- a/share/templates/en_US/warnings.tmpl +++ b/share/templates/en_US/warnings.tmpl @@ -467,12 +467,25 @@ to check these potential issues, and, if necessary, fix them and re-validate the </TMPL_IF> <TMPL_IF NAME="W26"> <li class="msg_warn" id="W26"><p><span class="err_type"><img src="images/info_icons/warning.png" alt="Warning" title="Warning" /></span> <span class="msg">Mismatch between Public and System identifiers in the DOCTYPE declaration</span></p> - <p>This document uses an inconsistent DOCTYPE declaration. The Public identifier + <p>This document uses an inconsistent DOCTYPE declaration. + <TMPL_IF NAME="W26_dtd_sys_recommend"> + The Public Identifier <code><TMPL_VAR NAME="W26_dtd_pub" ESCAPE="HTML"></code> declares the - <code><TMPL_VAR NAME="W26_dtd_pub_display" ESCAPE="HTML"></code> document type, but the associated System identifier + <code><TMPL_VAR NAME="W26_dtd_pub_display" ESCAPE="HTML"></code> document type, but the associated System Identifier <code><TMPL_VAR NAME="W26_dtd_sys" ESCAPE="HTML"></code> does not match this document type.</p> <p>The recommended System Identifier - for <code><TMPL_VAR NAME="W26_dtd_pub_display" ESCAPE="HTML"></code> is <code><TMPL_VAR NAME="W26_dtd_sys_recommend" ESCAPE="HTML"></code>.</p> + for <code><TMPL_VAR NAME="W26_dtd_pub_display" ESCAPE="HTML"></code> is <code><TMPL_VAR NAME="W26_dtd_sys_recommend" ESCAPE="HTML"></code>. + </TMPL_IF> + <TMPL_IF NAME="W26_dtd_pub_recommend"> + The System Identifier + <code><TMPL_VAR NAME="W26_dtd_sys" ESCAPE="HTML"></code> declares the + <code><TMPL_VAR NAME="W26_dtd_pub_display" ESCAPE="HTML"></code> document type, but the associated Public Identifier + <code><TMPL_VAR NAME="W26_dtd_pub" ESCAPE="HTML"></code> does not match this document type.</p> + <p>The recommended Public Identifier + for <code><TMPL_VAR NAME="W26_dtd_sys" ESCAPE="HTML"></code> is <code><TMPL_VAR NAME="W26_dtd_pub_recommend" ESCAPE="HTML"></code>. + </TMPL_IF> + + </p> <p>The safest way to use a correct DOCTYPE declaration is to copy and paste one from the <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" title="W3C QA - Recommended list of DTDs you can use in your Web document">recommended list</a> |