summaryrefslogtreecommitdiffstats
path: root/htdocs/docs/users.html
blob: 0ecaea4e493494da887396ff1485beb687c9ce2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
<!--#set var="revision" value="\$Id: users.html,v 1.19 2004-07-21 15:07:10 link Exp $"
--><!--#set var="date" value="\$Date: 2004-07-21 15:07:10 $"
--><!--#set var="title" value="User Documentation for The W3C Markup Validation Service"
--><!--#set var="relroot" value="../"
--><!--#include virtual="../header.html" -->

<div class="doc">

<h2>User's guide for the W3C Markup Validator</h2>

<h3 id="TableOfContents">Table of contents</h3>

    <div id="toc">
	<ul>
	<li><a href="#Quickstart">Quick Start</a></li>
	<li><a href="#Introduction">Introduction</a></li>
	<li><a href="#Options">Validator's options</a></li>
	<li><a href="#Calling">Calling/Linking to the Validator</a></li>
	<li><a href="#Interpret">Interpreting the results</a></li>
	<li><a href="#CommaTools">Comma Tools</a></li>
	<li><a href="#Installing">Installing the Markup Validator Locally</a></li>
	</ul>
    </div>

    <div id="Quickstart">
      <h3><a id="skip" name="skip"></a>Quick Start</h3>
      <p>
        Just type (or Cut&amp;Paste) the URL for the page you want to validate
        into the text field on the form and press the "Validate this page"
        button.
      </p>
      <p>
        If you have a local file you want to validate, choose the "File Upload"
        link from the navigation menu. Select the button labeled "Browse..."
        (or something like that, depending on your browser) and choose the file
        you want to upload in the usual manner for your OS.
      </p>
    </div>

    <div id="Introduction" class="stb">
      <h3>Introduction</h3>
      <p>
        The W3C Markup Validation Service is a web gateway to a well known SGML
        parser called SP. SP will take your HTML and compare it to a set of
        objective syntax rules called a "DTD", a Document Type Definition. This
        way you can be sure your HTML is really valid and not just that it
        conforms to some random programmer's idea of "nice" HTML. Note that
        valid HTML does not guarantee that your pages will work OK in all
        browsers. Most of them are severely broken and you may need to find
        alternate ways of achieving your goal.
      </p>
      <p>
        When you send an URL to the W3C Markup Validation Service, it will fetch
        that URL and feed it to the SGML parser. If you upload a file it'll get
        fed directly into the SGML parser. We then take the output from the
        SGML parser and format it nicely as HTML and send it back to your web
        browser. The W3C Markup Validation Service isn't generating any of the
        error messages; they are all generated by the underlying SGML Parser
        which is checking your HTML against the actual standard for the version
        of HTML you are using.
      </p>
    </div>

    <div id="Options" class="stb">
      <h3>The Options</h3>
      <p>
        In addition to the text field where you enter an URL -- or the file
        selection field if you are uploading files -- there are a few
        checkboxes that alter the behaviour of the validator.</p>
      <p>
	 These options are:
      </p>

      <dl>
	<dt><a id="option-charset" name="option-charset"></a>Encoding</dt>
	<dd>
	  <p>This allows you to <strong>override</strong> the character encoding
	  information about your document. You may use this option for test 
	  purposes, but you will eventually have to serve your document with the
	  correct character encoding, or the validator will <a href="help#faq-charset">complain</a> 
	  about it and you document will not be valid.</p>
	</dd>
	<dt><a id="option-fbc" name="option-fbc"></a>Use Fallback instead of Override (Encoding) (<code>fbc</code>)</dt>
	<dd>
	  <p>Uses the <a href="#option-charset">character encoding override</a> mechanism
	  described above, but only does it as a fall back mechanism if the actual document
	  is not served with character encoding information. Think of this as a gentler 
	  override mechanism.</p>
	</dd>
	<dt><a id="option-doctype" name="option-doctype"></a>Type</dt>
	<dd>
	  <p>This allows you to <strong>override</strong> the DOCTYPE declaration for you
	  document. You may use this option for test 
          purposes, but you will eventually have to serve your document with the
          correct character encoding, or the validator will <a href="help#faq-doctype">complain</a>
          about it and you document will not be valid.</p>
	</dd>
	<dt><a id="option-fbd" name="option-fbd"></a>Use Fallback instead of Override (Type) (<code>fbd</code>)</dt>
        <dd>
          <p>Uses the <a href="#option-doctype">Doctype override</a> mechanism
          described above, but only does it as a fall back mechanism if the actual document
          does not have a Doctype declaration. Think of this as a gentler override mechanism.</p>
        </dd>


        <dt><a id="option-ss" name="option-ss"></a>Show source input (<code>ss</code>)</dt>
        <dd>
          <p>Displays the HTML source of the document you validated and links
          error messages directly to lines in this output. Makes it easy to
          see what's wrong.</p>
        </dd>
        <dt><a id="option-outline" name="option-outline"></a>Show an outline of this document (<code>outline</code>)</dt>
        <dd>
          <p>Will generate an outline of your document from the H1 - H6 elements.
          For a properly formed document, this will be a nicely nested tree
          structure. The visualization of your document's structure makes it
          easier to see where you've skipped a heading.</p>
        </dd>
        <dt><a id="option-sp" name="option-sp"></a>Show parse tree (<code>sp</code>)</dt>
        <dd>
          <p>Shows you exactly how the SGML Parser read your document. Probably
          best used only by advanced users as it deals with low-level SGML
          constructs.</p>
        </dd>
        <dt><a id="option-noatt" name="option-noatt"></a>exclude attributes from the parse tree (<code>noatt</code>)</dt>
        <dd>
	  <p>Suppress attributes from the <a href="#option-sp">parse tree</a> to make it 
	  more readable.</p>
	</dd>
	<dt><a id="option-no200" name="option-no200"></a>Validate error pages</dt>
	<dd>
	  <p>The Markup Validator will usually tell you if the page you tried to validate
	  could not be retrieved (for example, if the server gave a "404 not found" message.
	  In some circumstances you may want to be able to validate the error page sent by 
	  the server. This is the option to use then.</p>
	</dd>
	<dt><a id="option-verbose" name="option-verbose"></a>Verbose Output</dt>
	<dd>
	  <p>This option triggers verbose output. By default the validator will only output
	  the validity result if the document is valid, but you may want to have more
	  information. This is the option to use then. The verbose output also provides helpful
	  explanations in addition to the error messages, which makes it a generally useful
	  option. </p>
	</dd>


      </dl>
    </div>

    <div id="Calling" class="stb">
      <h3>Calling/Linking to the Validator</h3>
      <p>
        You can link directly to the Validator home page, or you can call the
        Validator CGI program. The home page is &lt;<a
          href="http://validator.w3.org/">http://validator.w3.org/</a>&gt; at
        the moment (and for the foreseeable future) and the CGI program can be
        reached at &lt;<a
        href="http://validator.w3.org/check">http://validator.w3.org/check</a>&gt;.
      </p>
      <p>
        If you call the CGI program with extra path info matching "/referer"
        (i.e. &lt;<a href="http://validator.w3.org/check/referer">http://validator.w3.org/check/referer</a>&gt;)
        it will fetch the referring document and validate that. This means that
        if you embed a link to that URL in your pages, following on that link
        will send you the validation results for that page.
      </p>
      <p>
        You can also link to the validation results for a specific page. You do
        this by giving "check" an "uri" parameter pointing at the page you want
        to validate. For example &lt;<a href="http://validator.w3.org/check?uri=http://www.example.com/">http://validator.w3.org/check?uri=http://www.example.com/</a>&gt;
        will validate the www.example.com home page.
      </p>
      <p>
        The various options are listed above in the section
        "<a href="#Options">The Options</a>" in parenthesis after the long
        name. To add options to your links directly, append the options
        separated by a semi-colon. For example
        &lt;<a href="http://validator.w3.org/check?uri=http://www.example.com/;ss=1;outline=1;sp=1">http://validator.w3.org/check?uri=http://www.example.com/;ss=1;outline=1;sp=1</a>&gt;
        will validate the example.com home page with "Show Source", "Outline" and
        "Show Parse Tree" on, but "Exclude Attributes" off.
      </p>
      <p>
        You may also see these separated by ampersands, but this usage is
        deprecated and support may be removed at some time in the future.
      </p>
    </div>

    <div id="Interpret" class="stb">
      <h3>Interpreting the results</h3>
      <p>
        In spite of our efforts,  interpreting the Markup Validator's error messages 
	isn't quite what you'd call easy. The error messages are generated in the 
	context of a full SGML environment which demands a somewhat higher level 
	of technical detail then your average HTML document. We have set up a page 
	listing <a href="errors.html">errors and their explanation</a>, which should
	help you find out what meaning lies behind the cryptic messages, and fix
	your markup.
      </p>
      <p>
	We're working on ways to make the error messages more friendly, but for now,
	if the <a href="errors.html">errors explanation page</a> doesn't work for you,
	feel free to email the 
	(<a href="http://lists.w3.org/Archives/Public/www-validator/">publicly archived</a>)
        <a href="mailto:www-validator@w3.org">www-validator@w3.org</a>
        mailing list if you need help interpreting the results. This will have
        the added benefit of letting us know which error messages are causing
        the most trouble so we can fix those first. Please be as specific as
        possible and include the <em>exact</em> error message and, preferably, an URL
        we can validate to see for ourselves.
      </p>
      <div id="Output" class="stb">
        <h4>Output Options</h4>
        <p>
          In addition to the HTML output intended for human consumption in a
          browser, the Validator has some experimental features to generate
          machine parseable output in a few different forms. To enable these
          output options, append "<code>;output=&lt;option&gt;</code>" to the
          URL of the Validation results (an interface for these options will be
          provided when they exit the beta stage).
        </p>
        <p class="shout" id="api-warning">
	  <strong>These options are experimental!</strong>
	  The API and output format is subject to change without notice and
	  may well be removed or disabled at any time. They are provided now
	  to garner public feedback to determine how best to support this
	  functionality in the future. One particularly likely option being
	  considered is removing these features altogether in favor of a
	  full-blown SOAP interface. <em>You have been warned!</em>
	</p>
        <dl>
          <dt id="output-earl">EARL/RDF (<code>earl</code>)</dt>
          <dd>Produces output in the EARL RDF syntax.</dd>
	  <dt id="output-n3">Notation3 (<code>n3</code>)</dt>
	  <dd>Produces output in the Notation3 RDF syntax</dd>
	  <dt id="output-xml">XML (<code>xml</code>)</dt>
	  <dd>
            <p>Produces output in a homegrown XML format (yes, we know...).</p>
            <p>The DTD for this format is as follows:</p>
	    <pre>
	      <code>
&lt;!DOCTYPE result [
  &lt;!ELEMENT result (meta, warnings?, messages?)&gt;
  &lt;!ATTLIST result
    version CDATA #FIXED '0.9'
  &gt;

  &lt;!ELEMENT meta (uri, modified, server, size, encoding, doctype)&gt;
  &lt;!ELEMENT uri      (#PCDATA)&gt;
  &lt;!ELEMENT modified (#PCDATA)&gt;
  &lt;!ELEMENT server   (#PCDATA)&gt;
  &lt;!ELEMENT size     (#PCDATA)&gt;
  &lt;!ELEMENT encoding (#PCDATA)&gt;
  &lt;!ELEMENT doctype  (#PCDATA)&gt;

  &lt;!ELEMENT warnings (warning)+&gt;
  &lt;!ELEMENT warning  (#PCDATA)&gt;

  &lt;!ELEMENT messages (msg)*&gt;
  &lt;!ELEMENT msg      (#PCDATA)&gt;
  &lt;!ATTLIST msg
    line   CDATA #IMPLIED
    col    CDATA #IMPLIED
    offset CDATA #IMPLIED
  &gt;
]&gt;
              </code>
            </pre>
            <p>
	      Each element except the containers (<code>result</code>,
              <code>meta</code>, <code>warnings</code>, <code>messages</code>)
              and the free-form text fields (<code>warning</code>,
              <code>msg</code>) will take a single value of a specific type.
            </p>
            <p>
              The base document element is <code>result</code>. The only
              elements allowed to be directly contained at the first level are
              <code>meta</code>, <code>warnings</code>, and
              <code>messages</code>. <code>warnings</code>, and
              <code>messages</code> may be omitted if empty, and no first-level
              elements may appear more then once.
            </p>
            <div id="dtd-meta">
	      <h5>The <code>meta</code> element</h5>
	      <p>
                The <code>meta</code> element contains various metadata about
	        about the Validated document. It contains further elements
	        describing each value.
	      </p>
	      <dl>
	        <dt><code>uri</code></dt>
	        <dd>The URL of the document validated.</dd>
	        <dt><code>modified</code></dt>
	        <dd>The Last-Modified header field of the document as free-form text.</dd>
	        <dt><code>server</code></dt>
	        <dd>The Server header field of the document as free-form text.</dd>
	        <dt><code>size</code></dt>
	        <dd>The size in bytes of the document.</dd>
	        <dt><code>encoding</code></dt>
	        <dd>The Character Encoding used for Validation.</dd>
	        <dt><code>doctype</code></dt>
	        <dd>A text string describing the DOCTYPE used for Validation.</dd>
	      </dl>
	      <p>
	        Currently, the type of these fields is free-form text, but it
                is intended that a future revision will switch to less opaque
                data types so these values can be reliably machine-parsed.
              </p>
            </div>
	    <div id="dtd-warnings">
	      <h5>The <code>warnings</code> element</h5>
	      <p>
	        The <code>warnings</code> element can contain only one sub-element;
	        the <code>warning</code> element. Multiple <code>warning</code>
	        elements may appear and each one contains free-form text
                corresponding to a warning of the type found in the "Warnings"
	        section of the HTML output (e.g. "DOCTYPE override in effect!").
	      </p>
	    </div>
	    <div id="dtd-messages">
	      <h5>The <code>messages</code> element.</h5>
	      <p>
	        The <code>messages</code> element can contain only one sub-element;
	        the <code>msg</code> element. Multiple <code>msg</code> elements
	        may appear and each contains free-form text representing one
	        detected error. The <code>msg</code> element has three attributes;
	        <code>line</code>, <code>col</code>, <code>offset</code>.
	        These contain a number representing the line and column on which
	        the error was detected, and the offset in characters from the
	        beginning of the document (as opposed to <code>col</code> which
	        can be said to be the offset from the beginning of the line).
	      </p>
	    </div>
	  </dd>
	</dl>
      </div>
    </div>

    <div id="CommaTools">
      <h3>Comma Tools / Site Tools</h3>
      <p>
	This site uses "comma tools", as does <a href="http://www.w3.org/,tools">W3C</a>
	and other sites. This means you can append a string (starting with a comma, hence 
	the name) to the URL (address) of any page on the site and trigger 
	a few administrative or technical tools for this page. </p>

      <p>
	<strong>These tools are still under test, and reportedly do not work yet when
	appended to a validation result page.</strong>
      </p>

	<table class="comma">
	<tr class="comma">
	<th>What it does</th>
	<th>Tool used</th>
	<th>, shortcut</th>
	</tr>

	<tr class="comma">
  	<td class="comma-desc">
		A plain text version of the page.
	</td>
 	<td class="comma-tool">
		<a href="http://cgi.w3.org/cgi-bin/html2txt">HTML2Text</a>
	</td>
  	<td class="comma-shortcut">
		,text
	</td>
	</tr>

	<tr class="comma">
  	<td class="comma-desc">
		Validate the markup.
	</td>
 	<td class="comma-tool">
		W3C Markup Validator
	</td>
  	<td class="comma-shortcut">
		,validate
	</td>
	</tr>


	<tr class="comma">
  	<td class="comma-desc">
		Check links (anchors).
	</td>
 	<td class="comma-tool">
		W3C Link Checker
	</td>
  	<td class="comma-shortcut">
		,checklink or ,checklinks
	</td>
	</tr>


	<tr class="comma">
  	<td class="comma-desc">
		Check links (recursively)
	</td>
 	<td class="comma-tool">
		W3C Link Checker
	</td>
  	<td class="comma-shortcut">
		,rchecklink or ,rchecklinks
	</td>
	</tr>


	<tr class="comma">
  	<td class="comma-desc">
		A version of the page with linearized tables.
	</td>
 	<td class="comma-tool">
		Tablin
	</td>
  	<td class="comma-shortcut">
		,tablin
	</td>
	</tr>

	<tr class="comma">
  	<td class="comma-desc">
		CVS history for the page or resource.
	</td>
 	<td class="comma-tool">
		CVSWeb
	</td>
  	<td class="comma-shortcut">
		,cvs or ,cvslog
	</td>
	</tr>

	</table>
</div>

    <div id="Installing" class="stb">
      <h3>Installing a local Validator</h3>
      <p>
        You can download the Validator to run on your own system. For Web design departments
	or agencies it can be a very good idea, saving time and allowing you to not send 
	documents under work or confidential pages over the wire,  but it is a complex operation, 
	and is not recommended for average users, for which the free online service at W3C
	should suffice.
      </p>
      <p>
	We have created a simple <a href="install.html">Installation manual</a>, which, along with 
	the <a href="devel.html">Developer's information</a>, should help you install a local instance
	of the Markup Validator in your own network easily.
      </p>
    </div>
</div>

<!--#include virtual="../footer.html" -->
  </body>
</html>