- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 23 Feb 2006 13:32:10 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator
In directory hutz:/tmp/cvs-serv23369
Added Files:
api.html
Log Message:
--- NEW FILE: api.html ---
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Documentation of the Programmatic Interface (API) to The W3C CSS
Validation Service</title>
<link rev="made" href="mailto:www-validator-css@w3.org" />
<link rev="start" href="./" title="Home Page" />
<style type="text/css" media="all">
@import "http://validator.w3.org/base.css";</style>
<meta name="keywords"
content="HTML, HyperText Markup Language, Validation, W3C Markup Validation Service"
/>
<meta name="description"
content="W3C's easy-to-use HTML validation service, based on an SGML parser."
/>
<meta name="revision"
content="$Id: api.html,v 1.1 2006/02/23 13:32:08 ylafon Exp $" />
<!-- SSI Template Version: $Id: api.html,v 1.1 2006/02/23 13:32:08 ylafon Exp $ -->
</head>
<body>
<div id="banner">
<h1 id="title"><a href="http://www.w3.org/"><img height="48" alt="W3C"
id="logo" src="http://www.w3.org/Icons/WWW/w3c_home_nb" />
</a> <a href="http://www.w3.org/QA/"><img
src="http://www.w3.org/QA/2002/12/qa-small.png" alt="QA" />
</a> CSS Validation Service</h1>
</div>
<ul class="navbar" id="menu">
<li><span class="hideme"><a href="#skip" accesskey="2"
title="Skip past navigation to main part of page">Skip Navigation</a>
|</span> <a href="./" accesskey="1"
title="Go to the Home Page for The W3C CSS Validation Service"><strong>Home</strong></a></li>
<li><a href="http://validator.w3.org/"
title="In addition to fixing your CSS, fix your markup with the W3C Markup Validator">Markup
Validator</a></li>
<li><a href="http://validator.w3.org/checklink"
title="In addition to fixing your markup, fix your links with the W3C Link Checker">Link
Checker</a></li>
</ul>
<div id="main">
<!-- This DIV encapsulates everything in this page - necessary for the positioning -->
<div class="doc">
<h2>CSS Validator Web Service API<br />
SOAP 1.2 validation interface documentation</h2>
<h3 id="TableOfContents">Table of Contents</h3>
<div id="toc">
<ul>
<li><a href="#requestformat">Validation Request Format</a></li>
<li><a href="#soap12format">SOAP format description</a>
<ul>
<li><a href="#soap12_sample">sample SOAP 1.2 validation
response</a></li>
<li><a href="#soap12response">SOAP1.2 response format reference</a></li>
<li><a href="#soap12message">SOAP1.2 atomic message (error or warning)
format reference</a></li>
</ul>
</li>
</ul>
</div>
<p id="skip"></p>
<h3 id="requestformat">Validation Request Format</h3>
<p>Below is a table of the parameter you can use to send a query to the W3C
CSS Validator.</p>
<p>If you want to use W3c's public validation server, use the parameters
below in conjunction with the following base URI:<br />
<kbd>http://jigsaw.w3.org/css-validator/validator</kbd><br />
(replace with the address of your own server if you want to call a private
instance of the validator.</p>
<p><strong>Note</strong>: If you wish to call the validator programmatically
for a batch of documents, please make sure that your script will
<code>sleep</code> for <strong>at least 1 second</strong> between requests.
The CSS Validation service is a free, public service for all, your respect is
appreciated. thanks.</p>
<table class="refdoc">
<tbody>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default value</th>
</tr>
<tr>
<th>uri</th>
<td>The <acronym title="Universal Resource Locator">URL</acronym> of
the document to validate. CSS and HTML documents are allowed.</td>
<td>None, but either this parameter, or <code>text</code> must be
given.</td>
</tr>
<tr>
<th>text</th>
<td>The document to validate, only CSS is allowed.</td>
<td>None, but either this parameter, or <code>uri</code> must be
given.</td>
</tr>
<tr>
<th>usernedium</th>
<td>The medium used for the validation, like <code>screen</code>,
<code>print</code>, <code>braille</code>....</td>
<td><code>screen</code></td>
</tr>
<tr>
<th>output</th>
<td>Triggers the various outputs formats of the validator. If unset,
the usual Web format will be sent. If set to <code>soap12</code>, the
SOAP1.2 interface will be triggered. See <a href="soap12format">below
for the SOAP 1.2 response format description</a>.</td>
<td>unset</td>
</tr>
<tr>
<th>profile</th>
<td>The CSS profile used for the validation. It can be
<code>css1</code>, <code>css2</code>, <code>css21</code>,
<code>css3</code>, <code>svg</code>, <code>svgbasic</code>,
<code>svgtiny</code>, <code>mobile</code>, <code>atsc-tv</code>,
<code>tv</code> or <code>none</code></td>
<td>By default the profile used is the one from the most recent W3C
Recommendation: CSS 2</td>
</tr>
<tr>
<th>lang</th>
<td>The language used for the response, currently, <code>en</code>,
<code>fr</code>, <code>ja</code>, <code>it</code>, <code>es</code>,
<code>zh-cn</code>, <code>nl</code>, <code>de</code>.</td>
<td>By default English (<code>en</code>) is used.</td>
</tr>
<tr>
<th>warning</th>
<td>The warning level, <code>0</code> for less warnings, <code>1</code>
or <code>2</code> for more warnings</td>
<td>2</td>
</tr>
</tbody>
</table>
<h3 id="soap12format">SOAP format description</h3>
<p>When called with parameter <code>output=soap12</code>, the validator will
switch to its SOAP 1.2 interface. Below is a sample response, as well as a
description of the most important elements of the response.</p>
<h4>sample SOAP 1.2 validation request</h4>
<p>It is a simple HTTP GET call to a URI like:</p>
<p><code>http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.w3.org%2F&warning=0&profile=css2</code></p>
<h4 id="soap12_sample">sample SOAP 1.2 validation response</h4>
<p>A SOAP response for the validation of a document (invalid) will look like
this:</p>
<pre style="font-size: smaller"><?xml version='1.0' encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<m:cssvalidationresponse
env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
xmlns:m="http://www.w3.org/2005/07/css-validator">
<m:uri>http://www.w3.org/</m:uri>
<m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby>
<m:csslevel>css2</m:csslevel>
<m:date>2006.02.23T01:19:57Z</m:date>
<m:validity>true</m:validity>
<m:result>
<m:errors xml:lang="en">
<m:errorcount>0</m:errorcount>
</m:errors>
<m:warnings xml:lang="en">
<m:warningcount>79</m:warningcount>
<m:warninglist>
<m:uri>http://www.w3.org/StyleSheets/home.css</m:uri>
<m:warning>
<m:line>85</m:line>
<m:level>0</m:level>
<m:message>Properties for other media might not work for usermedium</m:message>
</m:warning>
</m:warninglist>
<m:warninglist>
<m:uri>http://www.w3.org/StyleSheets/home-import.css</m:uri>
<m:warning>
<m:line>167</m:line>
<m:level>0</m:level>
<m:message>Properties for other media might not work for usermedium</m:message>
</m:warning>
<m:warning>
<m:line>349</m:line>
<m:level>0</m:level>
<m:message>Properties for other media might not work for usermedium</m:message>
</m:warning>
<m:warning>
<m:line>362</m:line>
<m:level>0</m:level>
<m:message>Properties for other media might not work for usermedium</m:message>
</m:warning>
</m:warninglist>
</m:warnings>
</m:result>
</m:cssvalidationresponse>
</env:Body>
</env:Envelope></pre>
<h4 id="soap12response">SOAP1.2 response format reference</h4>
<table class="refdoc">
<tbody>
<tr>
<th>element</th>
<th>description</th>
</tr>
<tr>
<th id="soap12_markupvalidationresponse">cssvalidationresponse</th>
<td>The main element of the validation response. Encloses all other
information about the validation results.</td>
</tr>
<tr>
<th id="soap12_uri">uri</th>
<td>the address of the document validated. In <a
href="http://www.w3.org/WAI/ER/">EARL</a> terms, this is the
<kbd>TestSubject</kbd>.</td>
</tr>
<tr>
<th id="soap12_checkedby">checkedby</th>
<td>Location of the service which provided the validation result. In <a
href="http://www.w3.org/WAI/ER/">EARL</a> terms, this is the
<kbd>Assertor</kbd>.</td>
</tr>
<tr>
<th id="soap12_doctype">csslevel</th>
<td>The CSS level (or profile) in use during the validation.</td>
</tr>
<tr>
<th id="soap12_charset">date</th>
<td>The actual date of the validation</td>
</tr>
<tr>
<th id="soap12_validity">validity</th>
<td>Whether or not the document validated passed or not formal
validation (boolean)</td>
</tr>
<tr>
<th id="soap12_errors">errors</th>
<td>Encapsulates all data about errors encountered through the
validation process</td>
</tr>
<tr>
<th id="soap12_errorcount">errorcount</th>
<td>a child of <a href="#soap12_errors">errors</a>, counts the number
of errors listed</td>
</tr>
<tr>
<th id="soap12_errorlist">errorlist</th>
<td>a child of <a href="#soap12_errors">errors</a>, contains the list
of errors (surprise!)</td>
</tr>
<tr>
<th id="soap12_error">error</th>
<td>a child of <a href="#soap12_errorlist">errorlist</a>, contains the
information on a single validation error.</td>
</tr>
</tbody>
</table>
<p><strong>Note</strong>: <code>warnings</code>, <code>warningcount</code>,
<code>warninglist</code> and <code>warning</code> are similar to,
respectively, <code><a href="#soap12_errors">errors</a></code>, <code><a
href="soap12_errorcount">errorcount</a></code>, <code><a
href="soap12_errorlist">errorlist</a></code> and <code><a
href="soap12_error">error</a></code>.</p>
<h4 id="soap12message">SOAP1.2 atomic message (error or warning) format
reference</h4>
<p>As seen as the example above, the children of the <code><a
href="soap12_error">error</a></code> element, but also the
<code>warning</code> element are <code>line</code>, <code>col</code> and
<code>message</code>, defined below:</p>
<table class="refdoc">
<tbody>
<tr>
<th>element</th>
<th>description</th>
</tr>
<tr>
<th id="soap12_line">line</th>
<td>Within the source code of the validated document, refers to the
line where the error was detected.</td>
</tr>
<tr>
<th id="soap12_col">level</th>
<td>The level of the warning, only the ones whose level is under or
equal to the value specified in the request will be displayed.</td>
</tr>
<tr>
<th id="soap12_message">message</th>
<td>The actual error or warning message</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- End of "main" DIV. -->
<address>
<a href="../check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10" height="31" width="88"
alt="Valid XHTML 1.0!" />
</a> Feedback: <a
title="Send Feedback for the W3C Markup Validation Service"
href="../feedback.html">The W3C Validator Team</a><br />
$Date: 2006/02/23 13:32:08 $ <!-- SSI Template Version: $Id: api.html,v 1.1 2006/02/23 13:32:08 ylafon Exp $ -->
</address>
<p class="copyright"><a rel="Copyright"
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
© 1994-2006 <a href="http://www.w3.org/"><acronym
title="World Wide Web Consortium">W3C</acronym></a>® (<a
href="http://www.csail.mit.edu/"><acronym
title="Massachusetts Institute of Technology">MIT</acronym></a>, <a
href="http://www.ercim.org/"><acronym
title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
<a rel="Copyright"
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> and <a rel="Copyright"
href="http://www.w3.org/Consortium/Legal/copyright-software">software
licensing</a> rules apply. Your interactions with this site are in accordance
with our <a
href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a>
and <a
href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a>
privacy statements.</p>
</body>
</html>
Received on Thursday, 23 February 2006 13:32:15 UTC