Skip to content

Commit fef00cf

Browse files
Updated.
1 parent 6d9298d commit fef00cf

File tree

3 files changed

+280
-274
lines changed

3 files changed

+280
-274
lines changed

README.md

Lines changed: 6 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ to validate documents.
1212
**Note:** In the instructions, replace _"~/vnu.jar"_ with the actual path to the
1313
`vnu.jar` file on your system.
1414

15+
Usage · Pptions
16+
1517
## Command-line usage
1618

1719
You can use the `vnu.jar` validator as an executable for command-line validation
@@ -82,130 +84,11 @@ executable provides the following options:
8284

8385
Shows validator version number.
8486

85-
## Web-based usage
86-
87-
The `vnu.jar` validator provides a way for you to validate HTML documents over
88-
the Web, in a Web browser, as an HTTP service—just as with
89-
[http://html5.validator.nu/][5] and [http://validator.w3.org/nu/][6].
90-
91-
[5]: http://html5.validator.nu/ [6]: http://validator.w3.org/nu/
92-
93-
To run the validator as an HTTP service, open a new terminal window and invoke
94-
`vnu.jar` like this:
95-
96-
java -cp ~/vnu.jar nu.validator.servlet.Main 8888
97-
98-
Then open [http://localhost:8888][7] in a browser. (To have the validator listen
99-
on a different port, replace `8888` with the port number.)
100-
101-
[7]: http://localhost:8888
102-
103-
You’ll see a form similar to [http://validator.w3.org/nu/][8] that allows you to
104-
type in the URL of an HTML document and have the validation results for that
105-
document displayed in the browser.
106-
107-
[8]: http://validator.w3.org/nu/
108-
109-
## HTTP client (for fast command-line validation)
110-
111-
You can also use `vnu.jar` from the command line to send HTML documents to a
112-
locally-running instance of the HTTP service for validation. To validate
113-
documents in that way, do this:
114-
115-
1. Open a new terminal window and start up the validator as an HTTP service,
116-
as described in the "Web-based usage" section.
117-
118-
2. Open a second new terminal window and invoke `vnu.jar` like this:
119-
120-
java -cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...
121-
122-
### HTTP client options
123-
124-
When using `vnu.jar` for sending documents to a locally-running instance of the
125-
validator HTTP service for validation, you can set Java system properties to
126-
control configuration options for the validation behavior.
127-
128-
For example, you can suppress warning-level validation messages and only show
129-
error-level ones by setting the value of the `nu.validator.client.level` system
130-
property to `error`, like this:
131-
132-
java -Dnu.validator.client.level=error\
133-
-cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...
134-
135-
Most of the properties listed below map to the validator.nu common input
136-
parameters documented at
137-
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters][9].
138-
139-
[9]: http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters
140-
141-
#### nu.validator.client.host
142-
143-
Specifies the hostname of the validator for the client to connect to.
144-
145-
default: "127.0.0.1"
146-
147-
#### nu.validator.client.port
148-
149-
Specifies the hostname of the validator for the client to connect to.
150-
151-
default: "8888"
152-
153-
example: java -Dnu.validator.client.port=8080 -jar ~/vnu.jar FILE.html
154-
155-
#### nu.validator.client.level
156-
157-
Specifies the severity level of validation messages to report; to suppress
158-
warning-level messages, and only show error-level ones, set this property to
159-
"error".
160-
161-
default: [unset]
162-
163-
possible values: "error"
164-
165-
example: java -Dnu.validator.client.level=error -jar ~/vnu.jar FILE.html
166-
167-
#### nu.validator.client.parser
168-
169-
Specifies which parser to use.
170-
171-
default: "html"; or, for *.xhtml input files, "xml"
172-
173-
possible values: see
174-
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser][10]
175-
176-
[10]: http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser
177-
178-
#### nu.validator.client.charset
179-
180-
Specifies the encoding of the input document.
181-
182-
default: [unset]
183-
184-
#### nu.validator.client.content-type
185-
186-
Specifies the content-type of the input document.
187-
188-
default: "text/html"; or, for *.xhtml files, "application/xhtml+xml"
189-
190-
#### nu.validator.client.out
191-
192-
Specifies the output format for validation messages.
193-
194-
default: "gnu"
195-
196-
possible values: see
197-
[http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out][11]
198-
199-
[11]: http://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#out
200-
201-
#### nu.validator.client.asciiquotes
202-
203-
Specifies whether ASCII quotation marks are substituted for Unicode smart
204-
quotation marks in validation messages.
205-
206-
default: "yes"
87+
For details on using the `vnu.jar` validator to provide validation of HTML
88+
documents over the Web (in a Web browser, as an HTTP service), see [How to use
89+
the vnu.jar validator for Web-based validation][5].
20790

208-
possible values: "yes" or "no"
91+
[5]: http://validator.github.io/web-based-usage.html
20992

21093
For more information... sources bugz etc.
21194

index.html

Lines changed: 7 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,8 @@ <h1>How to use the vnu.jar validator</h1>
1919
file 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>
110104
Shows 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>
259115
For more information... sources bugz etc.
260116

0 commit comments

Comments
 (0)