W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2006

perl/modules/W3C/XHTML/HTMLCompatChecker/bin appCcheck.pl,1.37,1.38

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 05 Oct 2006 04:35:23 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1GVKx9-0003m9-2P@lionel-hutz.w3.org>

Update of /sources/public/perl/modules/W3C/XHTML/HTMLCompatChecker/bin
In directory hutz:/tmp/cvs-serv14336

Modified Files:
	appCcheck.pl 
Log Message:
adding debug output of wf errors and content-type

Index: appCcheck.pl
===================================================================
RCS file: /sources/public/perl/modules/W3C/XHTML/HTMLCompatChecker/bin/appCcheck.pl,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- appCcheck.pl	5 Oct 2006 02:41:21 -0000	1.37
+++ appCcheck.pl	5 Oct 2006 04:35:19 -0000	1.38
@@ -311,9 +311,12 @@
 <p>The document appears to not be well-formed XML. Either it is not XHTML (e.g HTML up to version 4.01) or it has XML well-formedness errors. 
 HTML Compatibility guidelines checking does not apply.
 </p>
+<TMPL_IF NAME="wf_errors">
+<p>WF errors: <TMPL_VAR NAME="wf_errors" ESCAPE="HTML"> </p>
+</TMPL_IF>
 </TMPL_UNLESS>
 <TMPL_UNLESS NAME="is_relevant_ct">
-<p>The document is not served with a <code>text/html</code> media type. HTML Compatibility guidelines checking does not apply.
+<p>The document is not served with a <code>text/html</code> media type (<TMPL_VAR NAME="content_type" ESCAPE="HTML">). HTML Compatibility guidelines checking does not apply.
 </TMPL_UNLESS>
 <TMPL_UNLESS NAME="is_relevant_doctype">
 The document does not appear to be XHTML 1.0. HTML Compatibility guidelines checking does not apply.
@@ -452,6 +455,13 @@
 	}
 }
 
+my $debug = 0;
+
+if (defined param('debug'))
+{
+        $debug = param('debug');
+}
+
 my $output = &prep_output($output_param);
 ## output defaults 
 $output->param(passed => 1);
@@ -472,6 +482,7 @@
     }
     if (defined $ct and length $ct) {
         &parse_content_type($ct);
+        $output->param(content_type => $ct);
     }
     
     if (defined $xml and length $xml)
@@ -486,7 +497,9 @@
         if ($@) # not well-formed
         {
                 $IS_WF = 0;
-         $output->param(info_count => 1);       
+                my $wf_errors = join '', $@;
+                $output->param(info_count => 1);
+                $output->param(wf_errors => $wf_errors);      
         }
         else # woot, WF
         {
Received on Thursday, 5 October 2006 04:35:30 GMT

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