Re: Validator without error-displaying?

On Thu, 2004-02-12 at 17:47, Julius Plenz wrote:

> I wonder if it is possible to turn displaying of errors off?

Sort of.

There are some experimental interfaces available,  try
output=(xml|earl|n3) in the query string.  These interfaces add various
X-W3C-Validator-* HTTP headers to the responses which may or may not be
useful so that they allow one to use HEAD requests to "hide" errors :)
Currently the headers are:

  X-W3C-Validator-Errors (number of errors found)
  X-W3C-Validator-Status ("Valid" or "Invalid")

Note that these are experimental and may change.

>  In the source code i found the following piece of code:
> 
>     $File->{Opt}->{'Show Errors'} = $q->param('errors')?TRUE:FALSE;
> 
> I interpreted that (without looking further for the function's code) as
> "If URI-parameter 'errors' ist set (to true), don't display errors";

Close, but not quite there.  The "errors" query string parameter
controls whether unprocessed error output from the underlying SGML/XML
parser will be included in the results page.  If set to a true value (as
far as Perl is concerned that is, ie. a non-empty string which is not
"0"), a "Raw Error Output" section containing that stuff can be found at
the bottom of the results page.

Received on Sunday, 15 February 2004 11:38:56 UTC