W3C::LogValidator::CSSValidator - [W3C Log Validator] Batch validation of CSS
style sheets (using the W3C CSS validator)
use W3C::LogValidator::CSSValidator;
my %config = ("verbose" => 2);
my $validator = W3C::LogValidator::CSSValidator->new(\%config);
$validator->uris('http://www.w3.org/StyleSheets/home.css', 'http://yoda.zoy.org/mt-static/styles.css');
my %result= $validator->process_list;
This module is part of the W3C::LogValidator suite, and is used as an interface
to the W3C CSS validation service.
- $val = W3C::LogValidator::CSSValidator->new
- Constructs a new
"W3C::LogValidator:CSSValidator"
processor.
You might pass it a configuration hash reference (see
"config_module" in W3C::LogValidator and
W3C::LogValidator::Config)
$validator = W3C::LogValidator::CSSValidator->new(\%config);
- $val->process_list
- Processes a list of sorted URIs through the W3C Markup Validator.
The list can be set "uris".
If the $val was given a config has when
constructed, and if the has has a "tmpfile" key,
"process_list" will try to read this
file as a hash of URIs and "hits" (popularity) with
DB_File.
Returns a result hash. Keys for this hash are:
name (string): the name of the module, i.e "CSSValidator"
intro (string): introduction to the processing results
thead (array): headers of the results table
trows (array of arrays): rows of the results table
outro (string): conclusion of the processing results
- $val->trim_uris
- Given a list of URIs of documents to process, returns a subset of this
list containing the URIs of documents the module supposedly can handle.
The decision is made based on file extensions (see
"auth_ext") and content-type (see
"HEAD_check")
- $val->HEAD_check
- Checks whether a document with no extension is actually a CSS document
through an HTTP HEAD request returns 1 if the URI is of an expected
content-type, 0 otherwise
- $val->auth_ext
- Returns the file extensions (space separated entries in a string)
supported by the Module. Public method accessing
$self->{AUTH_EXT}, itself coming from either
the AuthorizedExtensions configuration setting, or a default value
- $val->valid
- Sets / Returns whether the document being processed has been found to be
valid or not. If an argument is given, sets the variable, otherwise
returns the current variable.
- $val->valid_err_num
- Sets / Returns the number of validation errors for the document being
processed. If an argument is given, sets the variable, otherwise returns
the current variable.
- $val->valid_success
- Sets / Returns whether the module was able to process validation of the
current document successfully (regardless of valid/invalid result) If an
argument is given, sets the variable, otherwise returns the current
variable.
- $val->valid_head
- Sets / Returns all HTTP headers returned by the markup validator when
attempting to validate the current document. If an argument is given, sets
the variable, otherwise returns the current variable.
- $val->new_doc
- Resets all validation variables to 'undef'. In effect, prepares the
processing module to the handling of a new document.
Public bug-tracking interface at http://www.w3.org/Bugs/Public/
Olivier Thereaux <ot@w3.org>
W3C::LogValidator::LogProcessor, perl(1). Up-to-date complete info at
http://www.w3.org/QA/Tools/LogValidator/