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

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 UTC