diff options
-rwxr-xr-x | htdocs/docs/api.html | 10 | ||||
-rwxr-xr-x | htdocs/docs/users.html | 5 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 8 | ||||
-rw-r--r-- | share/templates/en_US/earl_n3.tmpl | 5 | ||||
-rw-r--r-- | share/templates/en_US/earl_xml.tmpl | 5 | ||||
-rw-r--r-- | share/templates/en_US/header.tmpl | 5 | ||||
-rw-r--r-- | share/templates/en_US/soap_fault.tmpl | 5 | ||||
-rw-r--r-- | share/templates/en_US/soap_output.tmpl | 5 | ||||
-rw-r--r-- | share/templates/en_US/ucn_output.tmpl | 5 | ||||
-rw-r--r-- | share/templates/en_US/xml_output.tmpl | 5 |
10 files changed, 36 insertions, 22 deletions
diff --git a/htdocs/docs/api.html b/htdocs/docs/api.html index b6dcb31..cabb745 100755 --- a/htdocs/docs/api.html +++ b/htdocs/docs/api.html @@ -1,5 +1,5 @@ -<!--#set var="revision" value="\$Id: api.html,v 1.10 2007-07-05 01:58:54 ot Exp $" ---><!--#set var="date" value="\$Date: 2007-07-05 01:58:54 $" +<!--#set var="revision" value="\$Id: api.html,v 1.11 2007-07-09 04:56:26 ot Exp $" +--><!--#set var="date" value="\$Date: 2007-07-09 04:56:26 $" --><!--#set var="title" value="Documentation of the Programmatic Interface (API) to The W3C Markup Validation Service" --><!--#set var="relroot" value="../" --><!--#include virtual="../header.html" --> @@ -313,8 +313,10 @@ element, but also the <code>warning</code> element are <code>line</code>, <code> <tr><th>Header</th><th>Value</th><th>Notes</th></tr> <tr> <td>X-W3C-Validator-Status</td> - <td><code>Valid</code> or <code>Invalid</code></td> - <td>May not be present if validation could not be performed (404 Not found, etc)</td> + <td><code>Valid</code> or <code>Invalid</code> if validation was performed.<br /> + value will be <code>Abort</code> if a fatal error (decoding, 404 not found, etc) + was encountered and validation could not be performed</td> + <td>Note: <code>Abort</code> value was added in version 0.8.0</td> </tr> <tr> <td>X-W3C-Validator-Errors</td> diff --git a/htdocs/docs/users.html b/htdocs/docs/users.html index 1574ceb..d2cdd5e 100755 --- a/htdocs/docs/users.html +++ b/htdocs/docs/users.html @@ -1,5 +1,5 @@ -<!--#set var="revision" value="\$Id: users.html,v 1.26 2006-11-15 08:02:46 ot Exp $" ---><!--#set var="date" value="\$Date: 2006-11-15 08:02:46 $" +<!--#set var="revision" value="\$Id: users.html,v 1.27 2007-07-09 04:56:26 ot Exp $" +--><!--#set var="date" value="\$Date: 2007-07-09 04:56:26 $" --><!--#set var="title" value="User Documentation for The W3C Markup Validation Service" --><!--#set var="relroot" value="../" --><!--#include virtual="../header.html" --> @@ -23,6 +23,7 @@ <ul> <li><a href="#Options">Options and Parameters</a></li> <li><a href="#Output">Output Formats</a></li> + <li><a href="api.html#http_headers">Using HTTP headers to know validation results</a></li> <li><a href="#deprecated_options">Deprecated options</a></li> </ul> </li> diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 33b3e3c..76d4ddb 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.535 2007-07-05 07:10:01 ot Exp $ +# $Id: check,v 1.536 2007-07-09 04:56:27 ot Exp $ # # Disable buffering on STDOUT! @@ -181,7 +181,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.535 $; + $VERSION = q$Revision: 1.536 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1011,6 +1011,10 @@ sub prep_template ($$) { my $over_charset_param = "override charset $File->{Opt}->{Charset}"; $T->param($over_charset_param => TRUE); } + + if ($File->{'Error Flagged'}) { + $T->param(fatal_error => TRUE); + } } sub fin_template ($$) { diff --git a/share/templates/en_US/earl_n3.tmpl b/share/templates/en_US/earl_n3.tmpl index cab2cdd..5086963 100644 --- a/share/templates/en_US/earl_n3.tmpl +++ b/share/templates/en_US/earl_n3.tmpl @@ -1,7 +1,8 @@ Content-Type: text/plain; charset=UTF-8 -X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="valid_status"> +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-Errors: <TMPL_VAR NAME="valid_errors_num"></TMPL_IF> @prefix earl: <http://www.w3.org/2001/03/earl/1.0-test#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . diff --git a/share/templates/en_US/earl_xml.tmpl b/share/templates/en_US/earl_xml.tmpl index 2c65590..77a45a5 100644 --- a/share/templates/en_US/earl_xml.tmpl +++ b/share/templates/en_US/earl_xml.tmpl @@ -1,7 +1,8 @@ Content-Type: application/rdf+xml; charset=UTF-8 -X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="valid_status"> +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-Errors: <TMPL_VAR NAME="valid_errors_num"></TMPL_IF> <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF diff --git a/share/templates/en_US/header.tmpl b/share/templates/en_US/header.tmpl index 2ba921d..109b50b 100644 --- a/share/templates/en_US/header.tmpl +++ b/share/templates/en_US/header.tmpl @@ -1,8 +1,9 @@ Content-Language: en Content-Type: text/html; charset=utf-8 -X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="valid_status"> +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-Errors: <TMPL_VAR NAME="valid_errors_num"></TMPL_IF> <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" diff --git a/share/templates/en_US/soap_fault.tmpl b/share/templates/en_US/soap_fault.tmpl index e4b4646..904a4a2 100644 --- a/share/templates/en_US/soap_fault.tmpl +++ b/share/templates/en_US/soap_fault.tmpl @@ -1,7 +1,8 @@ Content-Type: application/soap+xml; charset=UTF-8 -X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="valid_status"> +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-Errors: <TMPL_VAR NAME="valid_errors_num"></TMPL_IF> <?xml version='1.0' encoding="utf-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" diff --git a/share/templates/en_US/soap_output.tmpl b/share/templates/en_US/soap_output.tmpl index 5fdc18c..fc7f131 100644 --- a/share/templates/en_US/soap_output.tmpl +++ b/share/templates/en_US/soap_output.tmpl @@ -1,7 +1,8 @@ Content-Type: application/soap+xml; charset=UTF-8 -X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="valid_status"> +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-Errors: <TMPL_VAR NAME="valid_errors_num"></TMPL_IF> <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> diff --git a/share/templates/en_US/ucn_output.tmpl b/share/templates/en_US/ucn_output.tmpl index e688ae4..4a3a2b0 100644 --- a/share/templates/en_US/ucn_output.tmpl +++ b/share/templates/en_US/ucn_output.tmpl @@ -1,7 +1,8 @@ Content-Type: application/xml; charset=UTF-8 -X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="valid_status"> +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-Errors: <TMPL_VAR NAME="valid_errors_num"></TMPL_IF> <?xml version="1.0" encoding="UTF-8"?> <observationresponse xmlns="http://www.w3.org/unicorn/observationresponse" diff --git a/share/templates/en_US/xml_output.tmpl b/share/templates/en_US/xml_output.tmpl index d11b0dd..7ef5eaf 100644 --- a/share/templates/en_US/xml_output.tmpl +++ b/share/templates/en_US/xml_output.tmpl @@ -1,7 +1,8 @@ Content-Type: application/xml; charset=UTF-8 -X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="valid_status"> +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-Errors: <TMPL_VAR NAME="valid_errors_num"></TMPL_IF> <?xml version="1.0" encoding="UTF-8"?> <!-- |