Annotation of 2002/css-validator/manual.html.zh-cn, revision 1.14

1.1       ot          1: <?xml version="1.0" encoding="utf-8"?>
                      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>CSS验证器的用户手册</title>
                      7:   <link rev="made" href="mailto:www-validator-css@w3.org" />
                      8:   <link rev="start" href="./" title="Home Page" />
                      9:   <style type="text/css" media="all">
1.2       ot         10:     @import "style/base.css";    
                     11:     @import "style/docs.css";
1.1       ot         12:   </style>
                     13:   <meta name="revision"
1.14    ! ot         14:   content="$Id: manual.html.zh-cn,v 1.13 2008/07/08 15:59:57 ot Exp $" />
        !            15:   <!-- SSI Template Version: $Id: manual.html.zh-cn,v 1.13 2008/07/08 15:59:57 ot Exp $ -->
1.1       ot         16: </head>
                     17: 
                     18: <body>
                     19:   <div id="banner">
1.6       ot         20:    <h1 id="title"><a href="http://www.w3.org/"><img alt="W3C" width="110" height="61" id="logo" src="./images/w3c.png" /></a>
                     21:    <a href="./"><span>CSS Validation Service</span></a></h1>
                     22:    <p id="tagline">
                     23:      Check Cascading Style Sheets (CSS) and (X)HTML documents with style sheets
                     24:    </p>
                     25:   </div>
1.1       ot         26: 
                     27: <div id="main">
                     28: <!-- This DIV encapsulates everything in this page - necessary for the positioning -->
                     29: 
                     30: <div class="doc">
                     31: <h2>CSS验证器的用户手册</h2>
                     32: 
                     33: <h3 id="TableOfContents">目录</h3>
                     34: 
                     35: <div id="toc">
                     36: <ul>
                     37:   <li><a href="#use">如何使用CSS验证器</a>
                     38:     <ul>
                     39:       <li><a href="#url">V通过URL的Response来验证</a></li>
                     40:       <li><a href="#fileupload">通过上传文件来验证</a></li>
                     41:       <li><a href="#directinput">通过直接输入的内容来验证</a></li>
1.5       ot         42:       <li><a href="#basicvalidation">基本验证都作了什么工作?</a></li>
1.1       ot         43:     </ul>
                     44:   </li>
                     45:   <li><a href="#advanced">高级验证</a>
                     46:     <ul>
                     47:        <li><a href="#paramwarnings">警告</a></li>
                     48:        <li><a href="#paramprofile">配置</a></li>
                     49:        <li><a href="#parammedium">媒介</a></li>
                     50:     </ul>
                     51:   </li>
                     52:   <li><a href="#expert">写给专家的话</a>
                     53:     <ul>
                     54:        <li><a href="#requestformat">验证请求的格式</a></li>
                     55:        <li><a href="#api">CSS验证器的Web Service的API</a></li>
                     56:     </ul>
                     57:    </li>
                     58: </ul>
                     59: </div>
                     60: 
                     61: <p id="skip"></p>
                     62: 
                     63: <h3 id="use">如何使用CSS验证器</h3>
                     64: 
                     65: <p>
                     66: 使用验证器来验证一个CSS文档最简单的方法就是用基本界面。这里你会发现3种不同的页面,对应有3种不同的界面:
                     67: </p>
                     68: 
                     69: <h4 id="url">通过URL的Response来验证</h4>
                     70: <p>
                     71:     只需要指定一个你需要验证的文档的URL就可以验证该文档这个文档可以是HTML或者CSS文件
                     72: </p>
                     73: <img style="display: block; margin-left:auto; margin-right: auto;" 
1.4       ot         74:     src="./images/uri_basic_zh.png" alt="Validation by URI form" />
1.1       ot         75: 
                     76: <h4 id="fileupload">通过上传文件来验证</h4>    
                     77: <p>
                     78:     这个方法允许你上传然后验证你上传的文件。点击“浏览...”按钮,然后选择一个你的机器上的要进行验证的文件就可以进行验证
                     79: </p>
                     80: <img style="display: block; margin-left:auto; margin-right: auto;" 
1.4       ot         81:     src="./images/file_upload_basic_zh.png" 
1.1       ot         82:     alt="Validation by File Upload" />
                     83: <p>
                     84:     这种情况下,只允许使用CSS文档,也就是说,你不能上传HTML格式的文件。你还需要注意的一点是@import属性。只有当他们是一个明确的公开的URL的时候才会被验证(也就是说,不要使用相对路径)。 
                     85: </p>
                     86:    
                     87: <h4 id="directinput">通过直接输入的内容来验证</h4>
                     88: <p>
                     89:     这个方法目的是为了测试一段CSS的代码。你只需要在文本输入框中输入你的CSS代码就可以了。
                     90: </p>
                     91: <img style="display: block; margin-left:auto; margin-right: auto;" 
1.4       ot         92:     src="./images/direct_input_basic_zh.png" 
1.1       ot         93:     alt="Validation by direct input" />
                     94: <p>
                     95:     和上一种方法一样需要注意只能使用CSS的代码并且只能使用绝对的URL路径。这种方法在你的某一段CSS代码有问题希望得到解决的时候非常有用,也非常方便。在报告某个bug的时候也很简单,因为你可以将验证结果的URL给我们。
                     96: </p>    
                     97: 
                     98: <h4 id="basicvalidation">基本验证都作了什么工作?</h4>
                     99: 
                    100: <p>    
                    101:     当使用基本界面的时候,验证器会和<a href="http://www.w3.org/TR/CSS2">CSS2的标准(目前最新的标准)</a>进行比较,<br />你会看到一个XHTML格式的Error输出(不会包括警告)。
                    102:     <br />
                    103:     媒介会设定到使用所有的设备媒介(对于媒介的描述请参考<a href="http://www.w3.org/TR/CSS2/media.html">
                    104:     http://www.w3.org/TR/CSS2/media.html</a>)。
                    105: </p>
                    106: 
                    107: <h3 id="advanced">高级验证</h3>
                    108: 
                    109: <p>
                    110:     如果你需要一个更精确的验证,你可以使用高级验证界面,在高级验证界面中你可以设定三个参数,下面是对每个参数的简单说明。
                    111: </p>
                    112: 
                    113: <h4 id="paramwarnings">Warnings</h4>
                    114: 
                    115: <p>
                    116:     这个参数对控制CSS验证器的输出很有用。事实上,验证器能给出两种消息:错误和警告。错误是当被检查的CSS不符合CSS标准的要求的时候产生的,警告和错误不同,它不是说和标准不符合的问题,它们只是用来警告CSS的开发人员,某些CSS代码在不同的客户端上可能会有导致奇怪动作的危险。
                    117: </p>
                    118: <p>
                    119:     一个典型的警告就是使用了font-family的时候:如果你不是提供一个通用字体,你将会得到一个警告,告诉你应该在最后添加一个通用字体,否则某个客户端上可能不能识别你所设定的字体,从而转为该客户端的默认字体。而这样可能会导致一个很奇怪的显示内容。
                    120: </p>
                    121: 
                    122: <h4 id="paramprofile">配置</h4>
                    123: 
                    124: <p>
                    125:     CSS验证器可以检查不同的CSS配置。所谓的配置列出了一系列某一个特定平台上的的特性。配置本身的定义可以参考
                    126:     <a href="http://www.w3.org/Style/2004/css-charter-long.html#modules-and-profiles0">
                    127:        CSS站点
                    128:     </a>。默认的选择就是当前最常用的
1.9       ot        129:     <a href="http://www.w3.org/TR/CSS21">CSS 2.1标准</a>.
1.1       ot        130: </p>
                    131: 
                    132: <h4 id="parammedium">媒介</h4>
                    133: 
                    134: <p>
                    135:     这个参数就等同于@media规则,适用于所有的文档。你可以在
                    136:     <a href="http://www.w3.org/TR/CSS2/media.html">
                    137:        http://www.w3.org/TR/CSS2/media.html
                    138:     </a>找到更多的关于媒介的资料。
                    139: </p>
                    140: 
                    141: <h3 id="expert">写给专家的话</h3>
                    142: 
                    143: <h4 id="requestformat">验证请求的URL格式</h4>
                    144: <p>下面是某个发送给W3C的CSS验证服务器的URL请求中的参数列表</p>
                    145: 
                    146: <p>如果你想使用W3C的公开验证服务器,使用下面的参数,连接在下面基本URI之后来组织一个URL:<br />
                    147: <kbd>http://jigsaw.w3.org/css-validator/validator</kbd><br />
                    148: (将地址替换成你自己的服务器地址也可以)。</p>
                    149: 
                    150: <p><strong>注意</strong>: 如果你想这样在程序中调用验证器来验证一批文档,那么请一定在你的程序中设定每两次验证之间间隔
                    151: <strong>至少1秒</strong>。CSS验证服务是给所有人免费的服务,大家会感谢你对公共资源的尊重。</p>
                    152: 
                    153: <table class="refdoc">
                    154:   <tbody>
                    155:     <tr>
                    156:       <th>参数</th>
                    157:       <th>说明</th>
                    158:       <th>默认值</th>
                    159:     </tr>
                    160:     <tr>
                    161:       <th>uri</th>
                    162:       <td>等待被验证的文档的<acronym title="Universal Resource Locator">URL</acronym> 。CSS或者HTML都可以</td>
                    163:       <td>没有。但是这个参数和下面的<code>text</code>参数,至少有一个不为空。</td>
                    164:     </tr>
                    165:     <tr>
                    166:       <th>text</th>
                    167:       <td>被验证的CSS代码片断,只允许CSS代码</td>
                    168:       <td>没有。但是这个参数和上面的<code>uri</code>参数,至少有一个不为空。</td>
                    169:     </tr>
                    170:     <tr>
                    171:       <th>usermedium</th>
                    172:       <td>指定用于被验证的媒介(<a href="http://www.w3.org/TR/CSS2/media.html">medium</a>),例如<code>screen</code>,
                    173:          <code>print</code>, <code>braille</code>...</td>
                    174:       <td><code>all</code></td>
                    175:     </tr>
                    176:     <tr>
                    177:       <th>output</th>
                    178:       <td>设定验证器输出结果的格式。可能的格式有:
                    179:        <code>text/html</code> and <code>html</code> (XHTML document, 
                    180:        Content-Type: text/html), 
                    181:        <code>application/xhtml+xml</code> and <code>xhtml</code> (XHTML 
                    182:        document, Content-Type: application/xhtml+xml), 
                    183:        <code>application/soap+xml</code> and <code>soap12</code> (SOAP 1.2 
                    184:        document, Content-Type: application/soap+xml), 
                    185:        <code>text/plain</code> and <code>text</code> (text document, 
                    186:        Content-Type: text/plain),
                    187:        everything else (XHTML document, Content-Type: text/plain)      
                    188:       </td>
                    189:       <td>html</td>
                    190:     </tr>
                    191:     <tr>
                    192:       <th>profile</th>
                    193:       <td>设定用于验证比较的标准CSS配置文件。可以是
                    194:         <code>css1</code>, <code>css2</code>, <code>css21</code>,
                    195:         <code>css3</code>, <code>svg</code>, <code>svgbasic</code>,
                    196:         <code>svgtiny</code>, <code>mobile</code>, <code>atsc-tv</code>,
                    197:         <code>tv</code> or <code>none</code></td>
                    198:       <td>最新的W3C标准: CSS 2</td>
                    199:     </tr>
                    200:     <tr>
                    201:       <th>lang</th>
                    202:       <td>输出结果的语言,目前支持<code>en</code>,
1.11      ot        203:         <code>fr</code>, <code>it</code>, <code>ko</code>, <code>ja</code>, <code>es</code>,
1.1       ot        204:         <code>zh-cn</code>, <code>nl</code>, <code>de</code>.</td>
                    205:       <td>English (<code>en</code>).</td>
                    206:     </tr>
                    207:     <tr>
                    208:       <th>warning</th>
                    209:       <td>警告的级别:<code>no</code>  表示没有警告, <code>0</code> 
                    210:        精简的警告信息, <code>1</code>或者 <code>2</code> 详细警告信息
                    211:       </td>
                    212:       <td>2</td>
                    213:     </tr>
                    214:   </tbody>
                    215: </table>
                    216: 
                    217: <h4 id="api">CSS验证器的Web Service API: SOAP 1.2 验证接口文档</h4>
                    218: <p>    
                    219:     更多的技术帮助,特别是SOAP1.2的输出,以及所有可能调用验证的方法,请参考
                    220:     <a href="./api.html">CSS 验证器 Web Service API</a>.       
                    221: </p>
                    222: 
                    223: </div>
                    224: </div>
                    225: <!-- End of "main" DIV. -->
                    226: 
                    227:    <ul class="navbar"  id="menu">
                    228:        <li><strong><a href="./" title="Home page for the W3C CSS Validation Service">首页</a></strong> <span class="hideme">|</span></li>
1.3       ot        229:         <li><a href="documentation.html" title="Documentation for the W3C CSS Validation Service">文档</a> <span class="hideme">|</span></li>
                    230:         <li><a href="DOWNLOAD.html" title="Download the CSS validator">下载</a> <span class="hideme">|</span></li>
                    231:         <li><a href="Email.html" title="How to provide feedback on this service">反馈</a> <span class="hideme">|</span></li>
                    232:         <li><a href="thanks.html" title="Credits and Acknowlegments">创作者</a><span class="hideme">|</span></li>
1.1       ot        233: 
                    234:       </ul>
                    235: 
1.12      ot        236:       <ul id="lang_choice">
                    237:      
1.14    ! ot        238:      <li><a href="manual.html.de"
1.12      ot        239:          lang="de"
                    240:          xml:lang="de"
                    241:          hreflang="de"
                    242:          rel="alternate">Deutsch</a>
                    243:      </li>
                    244:      
1.14    ! ot        245:      <li><a href="manual.html.en"
1.12      ot        246:          lang="en"
                    247:          xml:lang="en"
                    248:          hreflang="en"
                    249:          rel="alternate">English</a>
                    250:      </li>
                    251:      
1.14    ! ot        252:      <li><a href="manual.html.es"
1.12      ot        253:          lang="es"
                    254:          xml:lang="es"
                    255:          hreflang="es"
                    256:          rel="alternate">Español</a>
                    257:      </li>
                    258:      
1.14    ! ot        259:      <li><a href="manual.html.fr"
1.12      ot        260:          lang="fr"
                    261:          xml:lang="fr"
                    262:          hreflang="fr"
                    263:          rel="alternate">Français</a>
                    264:      </li>
                    265:      
1.14    ! ot        266:      <li><a href="manual.html.ko"
1.12      ot        267:          lang="ko"
                    268:          xml:lang="ko"
                    269:          hreflang="ko"
                    270:          rel="alternate">한국어</a>
                    271:      </li>
                    272:      
1.14    ! ot        273:      <li><a href="manual.html.it"
1.12      ot        274:          lang="it"
                    275:          xml:lang="it"
                    276:          hreflang="it"
                    277:          rel="alternate">Italiano</a>
                    278:      </li>
                    279:      
1.14    ! ot        280:      <li><a href="manual.html.nl"
1.12      ot        281:          lang="nl"
                    282:          xml:lang="nl"
                    283:          hreflang="nl"
                    284:          rel="alternate">Nederlands</a>
                    285:      </li>
                    286:      
1.14    ! ot        287:      <li><a href="manual.html.ja"
1.12      ot        288:          lang="ja"
                    289:          xml:lang="ja"
                    290:          hreflang="ja"
                    291:          rel="alternate">日本語</a>
                    292:      </li>
                    293:      
1.14    ! ot        294:      <li><a href="manual.html.pl-PL"
1.12      ot        295:          lang="pl-PL"
                    296:          xml:lang="pl-PL"
                    297:          hreflang="pl-PL"
                    298:          rel="alternate">Polski</a>
                    299:      </li>
                    300:      
1.14    ! ot        301:      <li><a href="manual.html.pt-BR"
1.12      ot        302:          lang="pt-BR"
                    303:          xml:lang="pt-BR"
                    304:          hreflang="pt-BR"
                    305:          rel="alternate">Português</a>
                    306:      </li>
                    307:      
1.14    ! ot        308:      <li><a href="manual.html.ru"
1.12      ot        309:          lang="ru"
                    310:          xml:lang="ru"
                    311:          hreflang="ru"
                    312:          rel="alternate">Русский</a>
                    313:      </li>
                    314:      
1.14    ! ot        315:      <li><a href="manual.html.sv"
1.12      ot        316:          lang="sv"
                    317:          xml:lang="sv"
                    318:          hreflang="sv"
                    319:          rel="alternate">Svenska</a>
                    320:      </li>
                    321:      
1.14    ! ot        322:      <li><a href="manual.html.zh-cn"
1.12      ot        323:          lang="zh-cn"
                    324:          xml:lang="zh-cn"
                    325:          hreflang="zh-cn"
                    326:          rel="alternate">简体中文</a>
                    327:      </li>
                    328: </ul>
                    329: 
                    330: 
1.13      ot        331: 
                    332: 
1.12      ot        333: 
1.3       ot        334: 
                    335: 
1.6       ot        336:    <div id="footer">
1.1       ot        337:    <p id="activity_logos">
1.6       ot        338: 
1.1       ot        339:       <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>
                    340:    </p>
                    341: 
                    342:    <p id="support_logo">
                    343: 支持本工具,加入<br />
                    344: <a href="http://www.w3.org/Consortium/supporters"><img src="http://www.w3.org/Consortium/supporter-logos/csupporter.png" alt="W3C Supporter" /></a>
                    345:    </p>
                    346: 
                    347:     <p class="copyright">
1.10      ot        348:       <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 1994-2008
1.1       ot        349:       <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>&reg;
                    350: 
                    351:       (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
                    352:       <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
                    353:       <a href="http://www.keio.ac.jp/">Keio</a>),
                    354:       All Rights Reserved.
                    355:       W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">责任</a>,
                    356:       <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">商标</a>,已运用
                    357:       <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">文档授权</a>
                    358: 
                    359:       和 <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">软件授权</a>
                    360: 
                    361:       相关规则。你与本站的互动是符合我们的<a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">公开</a> 和
                    362:       <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">会员</a> 隐私声明。
                    363:     </p>
                    364: 
1.6       ot        365: </div>
1.1       ot        366:   </body>
                    367: </html>
                    368: 
                    369: 
                    370: 

Webmaster