summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhtdocs/whatsnew.html12
-rwxr-xr-xhttpd/cgi-bin/check27
-rw-r--r--share/templates/en_US/earl_xml.tmpl87
3 files changed, 73 insertions, 53 deletions
diff --git a/htdocs/whatsnew.html b/htdocs/whatsnew.html
index a501b61..32e5620 100755
--- a/htdocs/whatsnew.html
+++ b/htdocs/whatsnew.html
@@ -1,5 +1,5 @@
-<!--#set var="revision" value="\$Id: whatsnew.html,v 1.87 2009-12-02 19:53:34 ville Exp $"
---><!--#set var="date" value="\$Date: 2009-12-02 19:53:34 $"
+<!--#set var="revision" value="\$Id: whatsnew.html,v 1.88 2009-12-05 10:22:04 ville Exp $"
+--><!--#set var="date" value="\$Date: 2009-12-05 10:22:04 $"
--><!--#set var="title" value="What's New at The W3C Markup Validation Service"
--><!--#set var="relroot" value="./"
--><!--#set var="feeds" value="1"
@@ -81,6 +81,14 @@
improvement in non-mod_perl environments.
</li>
<li>
+ Enhancement: the
+ <abbr title="Evaluation and Report Language">EARL</abbr>/<abbr
+ title="Resource Description Framework">RDF</abbr> output format
+ has been updated to
+ <a href="http://www.w3.org/TR/2009/WD-EARL10-Schema-20091029/">version
+ 1.0 (20091029 Working Draft)</a>.
+ </li>
+ <li>
Bug fix:
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5132">full
document doctype was incorrectly in effect</a> when validating
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index f04ccc7..0c9cf35 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.744 2009-12-05 10:05:35 ville Exp $
+# $Id: check,v 1.745 2009-12-05 10:22:04 ville Exp $
#
# We need Perl 5.8.0+.
@@ -197,7 +197,7 @@ EOF
#
# Strings
- $VERSION = q$Revision: 1.744 $;
+ $VERSION = q$Revision: 1.745 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
# Read friendly error message file
@@ -901,14 +901,16 @@ if (!$File->{'Is Valid'} && $File->{Opt}->{'Show Tidy'}) {
}
my %templates = (
- earl => 'earl_xml.tmpl',
- n3 => 'earl_n3.tmpl',
- json => 'json_output.tmpl',
- ucn => 'ucn_output.tmpl',
+ earl => ['earl_xml.tmpl', default_escape => 'HTML'],
+ n3 => ['earl_n3.tmpl'],
+ json => ['json_output.tmpl'],
+ ucn => ['ucn_output.tmpl'],
);
my $template = $templates{$File->{Opt}->{Output}};
if ($template) {
- $template = &get_template($File, $template);
+ my $tname = shift(@$template);
+ my $tmpl = &get_template($File, $tname, @$template);
+ $template = $tmpl;
}
elsif ($File->{Opt}->{Output} eq 'soap12') {
if ($CFG->{'Enable SOAP'} != 1) {
@@ -980,12 +982,15 @@ exit;
# Subroutine definitions
#############################################################################
-sub get_template ($$)
+sub get_template ($$;@)
{
- my ($File, $fname) = @_;
+ my ($File, $fname, @opts) = @_;
if (!$File->{_Templates}->{$fname}) {
- my $tmpl = HTML::Template->new(%{$File->{Template_Defaults}},
- filename => $fname);
+ my $tmpl = HTML::Template->new(
+ %{$File->{Template_Defaults}},
+ filename => $fname,
+ @opts
+ );
$tmpl->param(cfg_home_page => $CFG->{'Home Page'});
$tmpl->param(validator_version => $VERSION);
$File->{_Templates}->{$fname} = $tmpl;
diff --git a/share/templates/en_US/earl_xml.tmpl b/share/templates/en_US/earl_xml.tmpl
index 5f29e8d..1b098a5 100644
--- a/share/templates/en_US/earl_xml.tmpl
+++ b/share/templates/en_US/earl_xml.tmpl
@@ -1,57 +1,64 @@
Content-Type: application/rdf+xml; charset=UTF-8
X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="fatal_error">
X-W3C-Validator-Status: Abort<TMPL_ELSE><TMPL_IF NAME="valid_status">
-X-W3C-Validator-Status: <TMPL_VAR NAME="valid_status"></TMPL_IF>
-X-W3C-Validator-Errors: <TMPL_VAR NAME="valid_errors_num">
-X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num"></TMPL_IF>
+X-W3C-Validator-Status: <TMPL_VAR NAME="valid_status" ESCAPE="NONE"></TMPL_IF>
+X-W3C-Validator-Errors: <TMPL_VAR NAME="valid_errors_num" ESCAPE="NONE">
+X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num" ESCAPE="NONE"></TMPL_IF>
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://www.w3.org/2001/03/earl/1.0-test#"
- xmlns:val="http://validator.w3.org/this_will_change/do_not_rely_on_it!">
+ xmlns:dct="http://purl.org/dc/terms/"
+ xmlns:foaf="http://xmlns.com/foaf/spec/#"
+ xmlns:ptr="http://www.w3.org/2009/pointers#"
+ xmlns="http://www.w3.org/ns/earl#">
- <Assertor rdf:about="http://validator.w3.org/">
- <name>W3 Validator</name>
- <contactInfo rdf:resource="http://validator.w3.org/about.html"/>
- <testMode rdf:resource="http://www.w3.org/2001/03/earl/1.00#Auto" />
+ <Software rdf:about="<TMPL_VAR NAME="cfg_home_page">about.html">
+ <dct:title xml:lang="en">W3C Markup Validation Service</dct:title>
+ <dct:description xml:lang="en">
+ The W3C Markup Validation Service is a free service by W3C that helps
+ check the validity of Web documents.
+ </dct:description>
+ <foaf:homepage><TMPL_VAR NAME="cfg_home_page"></foaf:homepage>
+ <dct:hasVersion><TMPL_VAR NAME="validator_version"></dct:hasVersion>
+ </Software>
+
+ <TestRequirement rdf:about="http://www.w3.org/Markup/">
+ <dct:title xml:lang="en">Markup validity</dct:title>
+ </TestRequirement>
<TMPL_IF NAME="VALID">
- <asserts>
- <Assertion>
- <subject rdf:resource="<TMPL_VAR NAME="file_uri" ESCAPE="HTML">" />
- <result rdf:resource="http://www.w3.org/2001/03/earl/1.00#passes" />
- <testCase rdf:resource="http://www.w3.org/MarkUp/" />
- <note>Valid!</note>
- </Assertion>
- </asserts>
+ <Assertion>
+ <assertedBy rdf:resource="<TMPL_VAR NAME="cfg_home_page">about.html"/>
+ <test rdf:resource="http://www.w3.org/Markup/"/>
+ <subject rdf:resource="<TMPL_VAR NAME="file_uri">"/>
+ <mode rdf:resource="http://www.w3.org/ns/earl#automatic"/>
+ <result rdf:resource="http://www.w3.org/ns/earl#passed" />
+ </Assertion>
<TMPL_ELSE>
+<TMPL_LOOP NAME="file_errors">
+ <Assertion rdf:ID="assert<TMPL_VAR NAME="__counter__">">
+ <assertedBy rdf:resource="<TMPL_VAR NAME="cfg_home_page">about.html"/>
+ <subject rdf:resource="<TMPL_VAR NAME="file_uri">"/>
+ <mode rdf:resource="http://www.w3.org/ns/earl#automatic"/>
+ <test rdf:resource="http://www.w3.org/Markup/"/>
+ <result rdf:resource="#error<TMPL_VAR NAME="__counter__">"/>
+ </Assertion>
- <asserts>
- <Assertion rdf:ID="result">
- <subject rdf:resource="<TMPL_VAR NAME="file_uri" ESCAPE="HTML">" />
- <result rdf:resource="http://www.w3.org/2001/03/earl/1.00#fails" />
- <testCase rdf:resource="http://www.w3.org/MarkUp/" />
- <note>Invalid!</note>
- </Assertion>
- </asserts>
+ <TestResult rdf:ID="error<TMPL_VAR NAME="__counter__">">
+ <outcome rdf:resource="http://www.w3.org/ns/earl#failed"/>
+ <dct:description xml:lang="en"><TMPL_VAR NAME="msg"></dct:description><TMPL_IF NAME="line">
+ <pointer rdf:resource="#pointer<TMPL_VAR NAME="__counter__">"/></TMPL_IF>
+ </TestResult>
+
+<TMPL_IF NAME="line">
+ <ptr:LineCharPointer rdf:ID="pointer<TMPL_VAR NAME="__counter__">">
+ <ptr:lineNumber><TMPL_VAR NAME="line"></ptr:lineNumber><TMPL_IF NAME="char">
+ <ptr:charNumber><TMPL_VAR NAME="char"></ptr:charNumber></TMPL_IF>
+ </ptr:LineCharPointer>
+</TMPL_IF>
-<TMPL_LOOP NAME="file_errors">
- <asserts>
- <Assertion rdf:ID="err<TMPL_VAR NAME="__counter__" ESCAPE="HTML">">
- <subject rdf:parseType="Resource">
- <reprOf rdf:resource="<TMPL_VAR NAME="file_uri" ESCAPE="HTML">"/>
- <val:line><TMPL_VAR NAME="line" ESCAPE="HTML"></val:line>
- <val:column><TMPL_VAR NAME="char" ESCAPE="HTML"></val:column>
- </subject>
- <result rdf:resource="http://www.w3.org/2003/03/earl/1.00#fails" />
- <testCase rdf:resource="http://www.w3.org/Markup/" />
- <note><TMPL_VAR NAME="msg" ESCAPE="HTML"></note>
- </Assertion>
- </asserts>
</TMPL_LOOP>
</TMPL_IF>
- </Assertor>
</rdf:RDF>
-