@@ -19,14 +19,8 @@ <h1>How to use the vnu.jar validator</h1>
1919file on your system.
2020
2121< p class =links >
22- Command-line:
23- < a href ="#command-line-usage "> usage</ a > ·
24- < a href ="#command-line-options "> options</ a >
25- |
26- Web-based:
27- < a href ="#web-based-usage "> usage</ a > ·
28- < a href ="#http-client "> client</ a > ·
29- < a href ="#http-client-options "> options</ a >
22+ < a href ="#command-line-usage "> Usage</ a > ·
23+ < a href ="#command-line-options "> Pptions</ a >
3024
3125 < div class =set >
3226 < section id =command-line-usage >
@@ -110,151 +104,13 @@ <h4 id="version">--version</h4>
110104Shows validator version number.
111105</ pre >
112106</ section >
113-
114- < section id =web-based-usage >
115- < h2 > Web-based usage</ h2 >
116-
117- < p > The < code > vnu.jar</ code > validator provides a way for you to
118- validate HTML documents over the Web, in a Web browser, as an HTTP
119- service—just as with
120- < a href ="http://html5.validator.nu/ "> http://html5.validator.nu/</ a >
121- and
122- < a href ="http://validator.w3.org/nu/ "> http://validator.w3.org/nu/</ a > .
123-
124- < p > To run the validator as an HTTP service, open a new terminal window
125- and invoke < code > vnu.jar</ code > like this:
126-
127- < pre >
128- java -cp ~/vnu.jar < span class =java-class > nu.validator.servlet.Main</ span > < span class =arg > 8888</ span >
129- </ pre >
130-
131- < p > Then open
132- < a href ="http://localhost:8888 "> http://localhost:8888</ a >
133- in a browser. (To have the validator listen on a different port,
134- replace < code class =arg > 8888</ code > with the port number.)
135-
136- < p > You’ll see a form similar to
137- < a href ="http://validator.w3.org/nu/ "> http://validator.w3.org/nu/</ a >
138- that allows you to type in the URL of an HTML document and have
139- the validation results for that document displayed in the browser.
140-
141- < section id =http-client >
142- < h2 > HTTP client (for fast command-line validation)</ h2 >
143-
144- < p > You can also use < code > vnu.jar</ code > from the command line to send
145- HTML documents to a locally-running instance of the HTTP service for
146- validation. To validate documents in that way, do this:
147-
148- < ol >
149-
150- < li > Open a new terminal window and start up the validator as an HTTP
151- service, as described in the
152- "< a href ="#web-based-usage "> Web-based usage</ a > " section.
153-
154- < li > Open a second new terminal window and invoke < code > vnu.jar</ code >
155- like this:
156-
157- < pre >
158- java -cp ~/vnu.jar < span class =java-class > nu.validator.client.HttpClient</ span > FILE.html...
159- </ pre >
160- </ ol >
161-
162- < h3 id ="http-client-options "> HTTP client options</ h3 >
163-
164- < p > When using < code > vnu.jar</ code > for sending documents to a
165- locally-running instance of the validator HTTP service for validation,
166- you can set Java system properties to control configuration options for the
167- validation behavior.
168-
169- < p > For example, you can suppress warning-level validation messages and only
170- show error-level ones by setting the value of the
171- < code > nu.validator.client.level</ code > system property to
172- < code > error</ code > , like this:</ p >
173-
174- < pre >
175- java < span class =java-property > -Dnu.validator.client.level=error</ span > \
176- -cp ~/vnu.jar < span class =java-class > nu.validator.client.HttpClient</ span > FILE.html...
177- </ pre >
178-
179- < p > Most of the properties listed below map to the validator.nu common input
180- parameters documented at
181- < a href ="http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters "
182- > http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters</ a > .
183-
184- < h4 id ="nuvalidatorclienthost "> nu.validator.client.host</ h4 >
185- < pre >
186- Specifies the hostname of the validator for the client to connect to.
187-
188- default: < span class =option-value > "127.0.0.1"</ span >
189- </ pre >
190-
191- < h4 id ="nuvalidatorclientport "> nu.validator.client.port</ h4 >
192- < pre >
193- Specifies the hostname of the validator for the client to connect to.
194-
195- default: < span class =option-value > "8888"</ span >
196-
197- example: java -Dnu.validator.client.port=8080 -jar ~/vnu.jar FILE.html
198- </ pre >
199-
200- < h4 id ="nuvalidatorclientlevel "> nu.validator.client.level</ h4 >
201- < pre >
202- Specifies the severity level of validation messages to report; to
203- suppress warning-level messages, and only show error-level ones, set
204- this property to "error".
205-
206- default: [unset]
207-
208- possible values: < span class =option-value > "error"</ span >
209-
210- example: java -Dnu.validator.client.level=error -jar ~/vnu.jar FILE.html
211- </ pre >
212-
213- < h4 id ="nuvalidatorclientparser "> nu.validator.client.parser</ h4 >
214- < pre >
215- Specifies which parser to use.
216-
217- default: < span class =option-value > "html"</ span > ; or, for *.xhtml input files, < span class =option-value > "xml"</ span >
218-
219- possible values: see < a href ="http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser "> http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser</ a >
220- </ pre >
221-
222- < h4 id ="nuvalidatorclientcharset "> nu.validator.client.charset</ h4 >
223- < pre >
224- Specifies the encoding of the input document.
225-
226- default: [unset]
227- </ pre >
228-
229- < h4 id ="nuvalidatorclientcontent-type "> nu.validator.client.content-type</ h4 >
230- < pre >
231- Specifies the content-type of the input document.
232-
233- default: < span class =option-value > "text/html"</ span > ; or, for *.xhtml files, < span class =option-value > "application/xhtml+xml"</ span >
234- </ pre >
235-
236- < h4 id ="nuvalidatorclientout "> nu.validator.client.out</ h4 >
237- < pre >
238- Specifies the output format for validation messages.
239-
240- default: "gnu"
241-
242- possible values: see < a href ="http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out "> http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out</ a >
243- </ pre >
244-
245- < h4 id ="nuvalidatorclientasciiquotes "> nu.validator.client.asciiquotes</ h4 >
246- < pre >
247- Specifies whether ASCII quotation marks are substituted for Unicode
248- smart quotation marks in validation messages.
249-
250- default: "yes"
251-
252- possible values: "yes" or "no"
253- </ pre >
254-
255- </ section >
256107</ div >
257108
109+ < p > For details on using the < code > vnu.jar</ code > validator to provide
110+ validation of HTML documents over the Web (in a Web browser, as an HTTP
111+ service), see
112+ < a href ="http://validator.github.io/web-based-usage.html "> How to use the vnu.jar validator for Web-based validation</ a > .
113+
258114< p >
259115For more information... sources bugz etc.
260116
0 commit comments