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

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

Webmaster