Annotation of 2002/css-validator/api.html, revision 1.5

1.1       ylafon      1: <?xml version="1.0"?>
                      2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
                      4: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                      5: <head>
                      6:   <title>Documentation of the Programmatic Interface (API) to The W3C CSS
                      7:   Validation Service</title>
                      8:   <link rev="made" href="mailto:www-validator-css@w3.org" />
                      9:   <link rev="start" href="./" title="Home Page" />
                     10:   <style type="text/css" media="all">
1.5     ! ot         11: @import "base.css";
        !            12: </style>
1.1       ylafon     13:   <meta name="revision"
1.5     ! ot         14:   content="$Id: api.html,v 1.4 2006/02/23 13:48:59 ylafon Exp $" />
        !            15:   <!-- SSI Template Version: $Id: api.html,v 1.4 2006/02/23 13:48:59 ylafon Exp $ -->
1.1       ylafon     16: </head>
                     17: 
                     18: <body>
                     19: 
1.5     ! ot         20:   <div id="banner">
        !            21:     <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>
        !            22:     <a href="./"><img src="images/css_validation_service.png" alt="CSS Validation Service" /></a></h1>
        !            23:    </div>
1.1       ylafon     24: 
                     25: 
                     26: <h2>CSS Validator Web Service API<br />
                     27: SOAP 1.2 validation interface documentation</h2>
                     28: 
                     29: <h3 id="TableOfContents">Table of Contents</h3>
                     30: 
                     31: <div id="toc">
                     32: <ul>
                     33:   <li><a href="#requestformat">Validation Request Format</a></li>
                     34:   <li><a href="#soap12format">SOAP format description</a> 
                     35:     <ul>
                     36:       <li><a href="#soap12_sample">sample SOAP 1.2 validation
                     37:       response</a></li>
                     38:       <li><a href="#soap12response">SOAP1.2 response format reference</a></li>
                     39:       <li><a href="#soap12message">SOAP1.2 atomic message (error or warning)
                     40:         format reference</a></li>
                     41:     </ul>
                     42:   </li>
                     43: </ul>
                     44: </div>
                     45: 
                     46: <p id="skip"></p>
                     47: 
                     48: <h3 id="requestformat">Validation Request Format</h3>
                     49: 
1.5     ! ot         50: <p>The documentation on how to create a custom request to the CSS validation service is available, 
        !            51: with a table of all existing parameters and their values, in the <a href="manual">User Manual</a>.</p>
1.1       ylafon     52: 
                     53: <h3 id="soap12format">SOAP format description</h3>
                     54: 
                     55: <p>When called with parameter <code>output=soap12</code>, the validator will
                     56: switch to its SOAP 1.2 interface. Below is a sample response, as well as a
                     57: description of the most important elements of the response.</p>
                     58: 
                     59: <h4>sample SOAP 1.2 validation request</h4>
                     60: 
                     61: <p>It is a simple HTTP GET call to a URI like:</p>
                     62: 
                     63: <p><code>http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.w3.org%2F&amp;warning=0&amp;profile=css2</code></p>
                     64: 
                     65: <h4 id="soap12_sample">sample SOAP 1.2 validation response</h4>
                     66: 
                     67: <p>A SOAP response for the validation of a document (invalid) will look like
                     68: this:</p>
                     69: <pre style="font-size: smaller">&lt;?xml version='1.0' encoding="utf-8"?&gt;
                     70: &lt;env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"&gt;
                     71:   &lt;env:Body&gt;
                     72:     &lt;m:cssvalidationresponse 
                     73:        env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" 
                     74:        xmlns:m="http://www.w3.org/2005/07/css-validator"&gt; 
                     75:       &lt;m:uri&gt;http://www.w3.org/&lt;/m:uri&gt; 
                     76:       &lt;m:checkedby&gt;http://jigsaw.w3.org/css-validator/&lt;/m:checkedby&gt;
                     77:       &lt;m:csslevel&gt;css2&lt;/m:csslevel&gt;
                     78:       &lt;m:date&gt;2006.02.23T01:19:57Z&lt;/m:date&gt;
                     79:       &lt;m:validity&gt;true&lt;/m:validity&gt;
                     80:       &lt;m:result&gt;
                     81:         &lt;m:errors xml:lang="en"&gt;
                     82:           &lt;m:errorcount&gt;0&lt;/m:errorcount&gt;
                     83:         &lt;/m:errors&gt;
                     84:         &lt;m:warnings xml:lang="en"&gt;
                     85:           &lt;m:warningcount&gt;79&lt;/m:warningcount&gt;
                     86:           &lt;m:warninglist&gt;
                     87:             &lt;m:uri&gt;http://www.w3.org/StyleSheets/home.css&lt;/m:uri&gt;
                     88:             &lt;m:warning&gt;
                     89:               &lt;m:line&gt;85&lt;/m:line&gt;
                     90:               &lt;m:level&gt;0&lt;/m:level&gt;
                     91:               &lt;m:message&gt;Properties for other media might not work for usermedium&lt;/m:message&gt;
                     92:             &lt;/m:warning&gt;
                     93:           &lt;/m:warninglist&gt;
                     94:           &lt;m:warninglist&gt;
                     95:             &lt;m:uri&gt;http://www.w3.org/StyleSheets/home-import.css&lt;/m:uri&gt;
                     96:             &lt;m:warning&gt;
                     97:               &lt;m:line&gt;167&lt;/m:line&gt;
                     98:               &lt;m:level&gt;0&lt;/m:level&gt;
                     99:               &lt;m:message&gt;Properties for other media might not work for usermedium&lt;/m:message&gt;
                    100:             &lt;/m:warning&gt;
                    101:             &lt;m:warning&gt;
                    102:               &lt;m:line&gt;349&lt;/m:line&gt;
                    103:               &lt;m:level&gt;0&lt;/m:level&gt;
                    104:               &lt;m:message&gt;Properties for other media might not work for usermedium&lt;/m:message&gt;
                    105:             &lt;/m:warning&gt;
                    106:             &lt;m:warning&gt;
                    107:               &lt;m:line&gt;362&lt;/m:line&gt;
                    108:               &lt;m:level&gt;0&lt;/m:level&gt;
                    109:               &lt;m:message&gt;Properties for other media might not work for usermedium&lt;/m:message&gt;
                    110:             &lt;/m:warning&gt;
                    111:           &lt;/m:warninglist&gt;
                    112:         &lt;/m:warnings&gt;
                    113:       &lt;/m:result&gt;
                    114:     &lt;/m:cssvalidationresponse&gt;
                    115:   &lt;/env:Body&gt;
                    116: &lt;/env:Envelope&gt;</pre>
                    117: 
                    118: <h4 id="soap12response">SOAP1.2 response format reference</h4>
                    119: 
                    120: <table class="refdoc">
                    121:   <tbody>
                    122:     <tr>
                    123:       <th>element</th>
                    124:       <th>description</th>
                    125:     </tr>
                    126:     <tr>
                    127:       <th id="soap12_markupvalidationresponse">cssvalidationresponse</th>
                    128:       <td>The main element of the validation response. Encloses all other
                    129:         information about the validation results.</td>
                    130:     </tr>
                    131:     <tr>
                    132:       <th id="soap12_uri">uri</th>
                    133:       <td>the address of the document validated. In <a
                    134:         href="http://www.w3.org/WAI/ER/">EARL</a> terms, this is the
                    135:         <kbd>TestSubject</kbd>.</td>
                    136:     </tr>
                    137:     <tr>
                    138:       <th id="soap12_checkedby">checkedby</th>
                    139:       <td>Location of the service which provided the validation result. In <a
                    140:         href="http://www.w3.org/WAI/ER/">EARL</a> terms, this is the
                    141:         <kbd>Assertor</kbd>.</td>
                    142:     </tr>
                    143:     <tr>
                    144:       <th id="soap12_doctype">csslevel</th>
                    145:       <td>The CSS level (or profile) in use during the validation.</td>
                    146:     </tr>
                    147:     <tr>
                    148:       <th id="soap12_charset">date</th>
                    149:       <td>The actual date of the validation</td>
                    150:     </tr>
                    151:     <tr>
                    152:       <th id="soap12_validity">validity</th>
                    153:       <td>Whether or not the document validated passed or not formal
                    154:         validation (boolean)</td>
                    155:     </tr>
                    156:     <tr>
                    157:       <th id="soap12_errors">errors</th>
                    158:       <td>Encapsulates all data about errors encountered through the
                    159:         validation process</td>
                    160:     </tr>
                    161:     <tr>
                    162:       <th id="soap12_errorcount">errorcount</th>
                    163:       <td>a child of <a href="#soap12_errors">errors</a>, counts the number
                    164:         of errors listed</td>
                    165:     </tr>
                    166:     <tr>
                    167:       <th id="soap12_errorlist">errorlist</th>
                    168:       <td>a child of <a href="#soap12_errors">errors</a>, contains the list
                    169:         of errors (surprise!)</td>
                    170:     </tr>
                    171:     <tr>
                    172:       <th id="soap12_error">error</th>
                    173:       <td>a child of <a href="#soap12_errorlist">errorlist</a>, contains the
                    174:         information on a single validation error.</td>
                    175:     </tr>
                    176:   </tbody>
                    177: </table>
                    178: 
                    179: <p><strong>Note</strong>: <code>warnings</code>, <code>warningcount</code>,
                    180: <code>warninglist</code> and <code>warning</code> are similar to,
                    181: respectively, <code><a href="#soap12_errors">errors</a></code>, <code><a
1.4       ylafon    182: href="#soap12_errorcount">errorcount</a></code>, <code><a
                    183: href="#soap12_errorlist">errorlist</a></code> and <code><a
                    184: href="#soap12_error">error</a></code>.</p>
1.1       ylafon    185: 
                    186: <h4 id="soap12message">SOAP1.2 atomic message (error or warning) format
                    187: reference</h4>
                    188: 
                    189: <p>As seen as the example above, the children of the <code><a
                    190: href="soap12_error">error</a></code> element, but also the
1.2       ylafon    191: <code>warning</code> element are <code>line</code>, <code>level</code> and
1.1       ylafon    192: <code>message</code>, defined below:</p>
                    193: 
                    194: <table class="refdoc">
                    195:   <tbody>
                    196:     <tr>
                    197:       <th>element</th>
                    198:       <th>description</th>
                    199:     </tr>
                    200:     <tr>
                    201:       <th id="soap12_line">line</th>
                    202:       <td>Within the source code of the validated document, refers to the
                    203:         line where the error was detected.</td>
                    204:     </tr>
                    205:     <tr>
                    206:       <th id="soap12_col">level</th>
                    207:       <td>The level of the warning, only the ones whose level is under or
                    208:         equal to the value specified in the request will be displayed.</td>
                    209:     </tr>
                    210:     <tr>
                    211:       <th id="soap12_message">message</th>
                    212:       <td>The actual error or warning message</td>
                    213:     </tr>
                    214:   </tbody>
                    215: </table>
1.5     ! ot        216: 
        !           217:    <ul class="navbar"  id="menu">
        !           218: 
        !           219:        <li><strong><a href="./" title="Home page for the W3C CSS Validation Service">Home</a></strong> <span class="hideme">|</span></li>
        !           220:        <li><a href="about" title="About this service">About</a> <span class="hideme">|</span></li>
        !           221: 
        !           222:         <li><a href="documentation" title="Documentation for the W3C CSS Validation Service">Documentation</a> <span class="hideme">|</span></li>
        !           223:         <li><a href="DOWNLOAD" title="Download the CSS validator">Download</a> <span class="hideme">|</span></li>
        !           224: 
        !           225:         <li><a href="Email" title="How to provide feedback on this service">Feedback</a> <span class="hideme">|</span></li>
        !           226:         <li><a href="thanks" title="Credits and Acknowlegments">Credits</a><span class="hideme">|</span></li>
        !           227: 
        !           228:       </ul>
        !           229: 
        !           230:    <p id="activity_logos">
        !           231:       <a href="http://www.w3.org/QA/" title="W3C's Quality Assurance Activity, bringing you free Web quality tools and more"><img src="http://www.w3.org/QA/2002/12/qa-small.png" alt="QA" /></a><a href="http://www.w3.org/Style/CSS/learning" title="Learn more about Cascading Style Sheets"><img src="images/woolly-icon" alt="CSS" /></a>
        !           232: 
        !           233:    </p>
        !           234: 
        !           235:    <p id="support_logo">
        !           236: Support this tool, become a<br />
        !           237: <a href="http://www.w3.org/Consortium/supporters"><img src="http://www.w3.org/Consortium/supporter-logos/csupporter.png" alt="W3C Supporter" /></a>
        !           238:    </p>
        !           239: 
        !           240:     <p class="copyright">
        !           241:       <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 1994-2006
        !           242:       <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>&reg;
        !           243: 
        !           244:       (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
        !           245:       <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
        !           246:       <a href="http://www.keio.ac.jp/">Keio</a>),
        !           247:       All Rights Reserved.
        !           248:       W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
        !           249:       <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
        !           250:       <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
        !           251: 
        !           252:       and <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a>
        !           253: 
        !           254:       rules apply. Your interactions with this site are in accordance
        !           255:       with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a> and
        !           256:       <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a> privacy
        !           257:       statements.
        !           258:     </p>
        !           259: 
        !           260: 
        !           261:   </body>
        !           262: 
1.1       ylafon    263: </html>
1.5     ! ot        264: 
        !           265: 

Webmaster