summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhttpd/cgi-bin/check76
-rw-r--r--share/templates/en_US/soap_output.tmpl3
-rw-r--r--share/templates/en_US/table.tmpl2
3 files changed, 52 insertions, 29 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index f92cdc8..ff48402 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -276,6 +276,7 @@ $File->{XMLWF_ONLY} = FALSE;
# Listrefs.
$File->{Warnings} = []; # Warnings...
$File->{Namespaces} = []; # Other (non-root) Namespaces.
+$File->{Parsers} = []; # Parsers used {name, link, options}
# By default, doctype-less documents can not be valid
$File->{"DOCTYPEless OK"} = FALSE;
@@ -864,8 +865,13 @@ sub compoundxml_validate (\$)
my $File = shift;
my $ua = W3C::Validator::UserAgent->new($CFG, $File);
- $File->{ParserName} = "validator.nu";
- $File->{ParserOpts} = "";
+ push(
+ @{$File->{Parsers}},
+ { name => "Compound XML",
+ link => "http://qa-dev.w3.org/", # TODO?
+ options => ""
+ }
+ );
my $url = URI->new($CFG->{External}->{CompoundXML});
$url->query("out=xml");
@@ -1019,8 +1025,13 @@ sub html5_validate (\$)
my $File = shift;
my $ua = W3C::Validator::UserAgent->new($CFG, $File);
- $File->{ParserName} = "validator.nu";
- $File->{ParserOpts} = "";
+ push(
+ @{$File->{Parsers}},
+ { name => "validator.nu",
+ link => "http://validator.nu/",
+ options => ""
+ }
+ );
my $url = URI->new($CFG->{External}->{HTML5});
$url->query("out=xml");
@@ -1189,9 +1200,8 @@ sub html5_validate (\$)
sub dtd_validate (\$)
{
- my $File = shift;
- my $opensp = SGML::Parser::OpenSP->new();
- my $parser_name = "SGML::Parser::OpenSP";
+ my $File = shift;
+ my $opensp = SGML::Parser::OpenSP->new();
#
# By default, use SGML catalog file and SGML Declaration.
@@ -1212,8 +1222,13 @@ sub dtd_validate (\$)
push(@spopt, 'min-tag');
}
- $File->{ParserName} = $parser_name;
- $File->{ParserOpts} = join(" ", @spopt);
+ push(
+ @{$File->{Parsers}},
+ { name => "OpenSP",
+ link => "http://openjade.sourceforge.net/",
+ options => join(" ", @spopt)
+ }
+ );
#
# Parser configuration
@@ -1270,6 +1285,11 @@ sub xmlwf (\$)
$xmlparser->base_uri($File->{URI})
unless ($File->{'Direct Input'} || $File->{'Is Upload'});
+ push(
+ @{$File->{Parsers}},
+ {name => "libxml2", link => "http://xmlsoft.org/", options => ""}
+ );
+
# Restrict file reading similar to what SGML::Parser::OpenSP does. Note
# that all inputs go through the callback so if we were passing a
# URI/filename to the parser, it would be affected as well and would break
@@ -1515,22 +1535,28 @@ sub fin_template ($$)
my $T = shift;
#
- # Set debug info for HTML report.
- $T->param(opt_debug => $DEBUG);
- $T->param(
- debug => [
- map({name => $_, value => $ENV{$_}},
- qw(no_proxy http_proxy https_proxy ftp_proxy FTP_PASSIVE)),
- {name => 'Content-Encoding', value => $File->{ContentEnc}},
- {name => 'Content-Language', value => $File->{ContentLang}},
- {name => 'Content-Location', value => $File->{ContentLoc}},
- {name => 'Transfer-Encoding', value => $File->{TransferEnc}},
- {name => 'Parse Mode', value => $File->{Mode}},
- {name => 'Parse Mode Factor', value => $File->{ModeChoice}},
- {name => 'Parser', value => $File->{ParserName}},
- {name => 'Parser Options', value => $File->{ParserOpts}},
- ],
- );
+ # Set debug info for HTML and SOAP reports.
+ if ($DEBUG) {
+ my @parsers;
+ for my $parser (@{$File->{Parsers}}) {
+ my $p = $parser->{name};
+ $p .= " (" . $parser->{options} . ")" if $parser->{options};
+ push(@parsers, $p);
+ }
+ $T->param(
+ debug => [
+ map({name => $_, value => $ENV{$_}},
+ qw(no_proxy http_proxy https_proxy ftp_proxy FTP_PASSIVE)),
+ {name => 'Content-Encoding', value => $File->{ContentEnc}},
+ {name => 'Content-Language', value => $File->{ContentLang}},
+ {name => 'Content-Location', value => $File->{ContentLoc}},
+ {name => 'Transfer-Encoding', value => $File->{TransferEnc}},
+ {name => 'Parse Mode', value => $File->{Mode}},
+ {name => 'Parse Mode Factor', value => $File->{ModeChoice}},
+ {name => 'Parsers Used', value => join(", ", @parsers)},
+ ],
+ );
+ }
if (!$File->{Doctype} &&
(!$File->{Version} ||
diff --git a/share/templates/en_US/soap_output.tmpl b/share/templates/en_US/soap_output.tmpl
index 238e5c4..7b3dec9 100644
--- a/share/templates/en_US/soap_output.tmpl
+++ b/share/templates/en_US/soap_output.tmpl
@@ -9,9 +9,8 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num"></TMPL_IF>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<m:markupvalidationresponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:m="http://www.w3.org/2005/10/markup-validator">
- <TMPL_IF NAME="opt_debug">
<TMPL_LOOP NAME="debug"><m:debug name="<TMPL_VAR NAME="name" ESCAPE="HTML">"><TMPL_VAR NAME="value" ESCAPE="HTML" DEFAULT="(undefined)"></m:debug>
- </TMPL_LOOP></TMPL_IF>
+ </TMPL_LOOP>
<m:uri><TMPL_VAR NAME="file_uri" ESCAPE="HTML"></m:uri>
<m:checkedby><TMPL_VAR NAME="env_home_page" ESCAPE="HTML"></m:checkedby>
<m:doctype><TMPL_VAR NAME="file_doctype" ESCAPE="HTML"></m:doctype>
diff --git a/share/templates/en_US/table.tmpl b/share/templates/en_US/table.tmpl
index 7639cf4..7707640 100644
--- a/share/templates/en_US/table.tmpl
+++ b/share/templates/en_US/table.tmpl
@@ -67,11 +67,9 @@
<tr><th>Size:</th><td colspan="2"><TMPL_VAR NAME="file_size" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
<tr><th>Content-Type:</th><td colspan="2"><TMPL_VAR NAME="file_contenttype" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
</TMPL_IF>
-<TMPL_IF NAME="opt_debug">
<TMPL_LOOP NAME="debug">
<tr><th><TMPL_VAR NAME="name" ESCAPE="HTML">:</th><td colspan="2"><TMPL_VAR NAME="value" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
</TMPL_LOOP>
-</TMPL_IF>
<TMPL_IF NAME="file_charset">
<tr>
<th><label title="Character Encoding" for="charset">Encoding</label>:</th>