Skip to content

Commit 6d9298d

Browse files
Updated.
1 parent 97e7304 commit 6d9298d

File tree

2 files changed

+42
-41
lines changed

2 files changed

+42
-41
lines changed

README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11
# How to use the vnu.jar validator
22

3-
The `vnu.jar` validator is a packaged standalone version of the
4-
[validator.nu][1] code. The [latest version][2] is available from the [validator
5-
area at github][3]. The following are instructions on how to use it to validate
6-
documents.
3+
The `vnu.jar` application is a portable standalone version of the
4+
[validator.nu][1] validator. The [latest version][2] is available from the
5+
[validator area at github][3]. The following are instructions on how to use it
6+
to validate documents.
77

88
[1]: http://about.validator.nu/
99
[2]: https://github.com/validator/validator.github.io/releases
1010
[3]: https://github.com/validator/validator.github.io/
1111

12+
**Note:** In the instructions, replace _"~/vnu.jar"_ with the actual path to the
13+
`vnu.jar` file on your system.
14+
1215
## Command-line usage
1316

1417
You can use the `vnu.jar` validator as an executable for command-line validation
1518
of HTML documents by invoking it like this:
1619

17-
java -jar vnu.jar [--html] [--entities] [--schema URL]
20+
java -jar ~/vnu.jar [--help] [--html] [--entities] [--schema URL]
1821
[--format gnu|xml|json|text] [--verbose] [--version] FILES
1922

2023
To validate one or more documents from the command line:
2124

22-
java -jar vnu.jar FILE.html FILE2.html FILE3.HTML FILE4.html...
25+
java -jar ~/vnu.jar FILE.html FILE2.html FILE3.HTML FILE4.html...
2326

2427
To validate all HTML documents in a particular directory:
2528

26-
java -jar vnu.jar some-directory-name/
29+
java -jar ~/vnu.jar some-directory-name/
2730

2831
To validate a Web document:
2932

30-
java -jar vnu.jar http://example.com/foo
33+
java -jar ~/vnu.jar http://example.com/foo
3134

3235
### Command-line options
3336

@@ -41,7 +44,7 @@ executable provides the following options:
4144

4245
default: [unset; the XML parser will attempt to load external entities]
4346

44-
#### --format format
47+
#### --format _format_
4548

4649
Specifies the output format for validation results.
4750

@@ -61,7 +64,7 @@ executable provides the following options:
6164

6265
default: [unset; *.xhtml documents are parsed by the XML parser]
6366

64-
#### --schema URL
67+
#### --schema _URL_
6568

6669
Specifies a URL for a known http://s.validator.nu/* schema to use for
6770
document validation.
@@ -90,7 +93,7 @@ the Web, in a Web browser, as an HTTP service—just as with
9093
To run the validator as an HTTP service, open a new terminal window and invoke
9194
`vnu.jar` like this:
9295

93-
java -cp vnu.jar nu.validator.servlet.Main 8888
96+
java -cp ~/vnu.jar nu.validator.servlet.Main 8888
9497

9598
Then open [http://localhost:8888][7] in a browser. (To have the validator listen
9699
on a different port, replace `8888` with the port number.)
@@ -110,24 +113,24 @@ locally-running instance of the HTTP service for validation. To validate
110113
documents in that way, do this:
111114

112115
1. Open a new terminal window and start up the validator as an HTTP service,
113-
as described in the Web-based usage section.
116+
as described in the "Web-based usage" section.
114117

115118
2. Open a second new terminal window and invoke `vnu.jar` like this:
116119

117-
java -cp vnu.jar nu.validator.client.HttpClient FILE.html...
120+
java -cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...
118121

119122
### HTTP client options
120123

121-
When using the `vnu.jar` for sending documents to a locally-running instance of
122-
the validator HTTP service for validation, you can set Java system properties to
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
123126
control configuration options for the validation behavior.
124127

125128
For example, you can suppress warning-level validation messages and only show
126129
error-level ones by setting the value of the `nu.validator.client.level` system
127130
property to `error`, like this:
128131

129132
java -Dnu.validator.client.level=error\
130-
-cp vnu.jar nu.validator.client.HttpClient FILE.html...
133+
-cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...
131134

132135
Most of the properties listed below map to the validator.nu common input
133136
parameters documented at
@@ -147,7 +150,7 @@ parameters documented at
147150

148151
default: "8888"
149152

150-
example: java -Dnu.validator.client.port=8080 -jar vnu.jar FILE.html
153+
example: java -Dnu.validator.client.port=8080 -jar ~/vnu.jar FILE.html
151154

152155
#### nu.validator.client.level
153156

@@ -159,7 +162,7 @@ parameters documented at
159162

160163
possible values: "error"
161164

162-
example: java -Dnu.validator.client.level=error -jar vnu.jar FILE.html
165+
example: java -Dnu.validator.client.level=error -jar ~/vnu.jar FILE.html
163166

164167
#### nu.validator.client.parser
165168

index.html

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
<!doctype html><html><head><meta charset=utf-8>
2-
<title>How to use the validator - validator.github.io</title></head>
2+
<title>How to use the vnu.jar validator</title></head>
33
<body>
44
<h1>How to use the vnu.jar validator</h1>
55

6-
<p>The <code>vnu.jar</code> validator is a packaged standalone
6+
<p>The <code>vnu.jar</code> application is a portable standalone
77
version of the
88
<a href="http://about.validator.nu/">validator.nu</a>
9-
code. The
9+
validator. The
1010
<a href="https://github.com/validator/validator.github.io/releases"
1111
>latest version</a>
1212
is available from the
1313
<a href="https://github.com/validator/validator.github.io/"
1414
>validator area at github</a>.
1515
The following are instructions on how to use it to validate documents.
1616

17+
<p class=note><b>Note:</b> In the instructions, replace
18+
<var>"~/vnu.jar"</var> with the actual path to the <code>vnu.jar</code>
19+
file on your system.
20+
1721
<p class=links>
1822
Command-line:
1923
<a href="#command-line-usage">usage</a> ·
@@ -32,26 +36,26 @@ <h2>Command-line usage</h2>
3236
command-line validation of HTML documents by invoking it like this:
3337

3438
<pre>
35-
java -jar vnu.jar [--html] [--entities] [--schema URL]
39+
java -jar ~/vnu.jar [--help] [--html] [--entities] [--schema URL]
3640
[--format gnu|xml|json|text] [--verbose] [--version] FILES
3741
</pre>
3842

3943
<p>To validate one or more documents from the command line:
4044

4145
<pre>
42-
java -jar vnu.jar FILE.html FILE2.html FILE3.HTML FILE4.html...
46+
java -jar ~/vnu.jar FILE.html FILE2.html FILE3.HTML FILE4.html...
4347
</pre>
4448

4549
<p>To validate all HTML documents in a particular directory:
4650

4751
<pre>
48-
java -jar vnu.jar some-directory-name/
52+
java -jar ~/vnu.jar some-directory-name/
4953
</pre>
5054

5155
<p>To validate a Web document:
5256

5357
<pre>
54-
java -jar vnu.jar http://example.com/foo
58+
java -jar ~/vnu.jar http://example.com/foo
5559
</pre>
5660

5761
<h3 id="command-line-options">Command-line options</h3>
@@ -121,7 +125,7 @@ <h2>Web-based usage</h2>
121125
and invoke <code>vnu.jar</code> like this:
122126

123127
<pre>
124-
java -cp vnu.jar <span class=java-class>nu.validator.servlet.Main</span> <span class=arg>8888</span>
128+
java -cp ~/vnu.jar <span class=java-class>nu.validator.servlet.Main</span> <span class=arg>8888</span>
125129
</pre>
126130

127131
<p>Then open
@@ -145,22 +149,22 @@ <h2>HTTP client (for fast command-line validation)</h2>
145149

146150
<li>Open a new terminal window and start up the validator as an HTTP
147151
service, as described in the
148-
<a href="#web-based-usage">Web-based usage</a> section.
152+
"<a href="#web-based-usage">Web-based usage</a>" section.
149153

150154
<li>Open a second new terminal window and invoke <code>vnu.jar</code>
151155
like this:
152156

153157
<pre>
154-
java -cp vnu.jar <span class=java-class>nu.validator.client.HttpClient</span> FILE.html...
158+
java -cp ~/vnu.jar <span class=java-class>nu.validator.client.HttpClient</span> FILE.html...
155159
</pre>
156160
</ol>
157161

158162
<h3 id="http-client-options">HTTP client options</h3>
159163

160-
<p>When using the <code>vnu.jar</code> for sending documents to a
164+
<p>When using <code>vnu.jar</code> for sending documents to a
161165
locally-running instance of the validator HTTP service for validation,
162-
you can set Java system properties to control configuration options for
163-
the validation behavior.
166+
you can set Java system properties to control configuration options for the
167+
validation behavior.
164168

165169
<p>For example, you can suppress warning-level validation messages and only
166170
show error-level ones by setting the value of the
@@ -169,7 +173,7 @@ <h3 id="http-client-options">HTTP client options</h3>
169173

170174
<pre>
171175
java <span class=java-property>-Dnu.validator.client.level=error</span>\
172-
-cp vnu.jar <span class=java-class>nu.validator.client.HttpClient</span> FILE.html...
176+
-cp ~/vnu.jar <span class=java-class>nu.validator.client.HttpClient</span> FILE.html...
173177
</pre>
174178

175179
<p>Most of the properties listed below map to the validator.nu common input
@@ -184,17 +188,15 @@ <h4 id="nuvalidatorclienthost">nu.validator.client.host</h4>
184188
default: <span class=option-value>"127.0.0.1"</span>
185189
</pre>
186190

187-
188191
<h4 id="nuvalidatorclientport">nu.validator.client.port</h4>
189192
<pre>
190193
Specifies the hostname of the validator for the client to connect to.
191194

192195
default: <span class=option-value>"8888"</span>
193196

194-
example: java -Dnu.validator.client.port=8080 -jar vnu.jar FILE.html
197+
example: java -Dnu.validator.client.port=8080 -jar ~/vnu.jar FILE.html
195198
</pre>
196199

197-
198200
<h4 id="nuvalidatorclientlevel">nu.validator.client.level</h4>
199201
<pre>
200202
Specifies the severity level of validation messages to report; to
@@ -205,10 +207,9 @@ <h4 id="nuvalidatorclientlevel">nu.validator.client.level</h4>
205207

206208
possible values: <span class=option-value>"error"</span>
207209

208-
example: java -Dnu.validator.client.level=error -jar vnu.jar FILE.html
210+
example: java -Dnu.validator.client.level=error -jar ~/vnu.jar FILE.html
209211
</pre>
210212

211-
212213
<h4 id="nuvalidatorclientparser">nu.validator.client.parser</h4>
213214
<pre>
214215
Specifies which parser to use.
@@ -218,23 +219,20 @@ <h4 id="nuvalidatorclientparser">nu.validator.client.parser</h4>
218219
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>
219220
</pre>
220221

221-
222222
<h4 id="nuvalidatorclientcharset">nu.validator.client.charset</h4>
223223
<pre>
224224
Specifies the encoding of the input document.
225225

226226
default: [unset]
227227
</pre>
228228

229-
230229
<h4 id="nuvalidatorclientcontent-type">nu.validator.client.content-type</h4>
231230
<pre>
232231
Specifies the content-type of the input document.
233232

234233
default: <span class=option-value>"text/html"</span>; or, for *.xhtml files, <span class=option-value>"application/xhtml+xml"</span>
235234
</pre>
236235

237-
238236
<h4 id="nuvalidatorclientout">nu.validator.client.out</h4>
239237
<pre>
240238
Specifies the output format for validation messages.
@@ -319,7 +317,7 @@ <h4 id="nuvalidatorclientasciiquotes">nu.validator.client.asciiquotes</h4>
319317
background-color: white;
320318
color: black;
321319
}
322-
.set {
320+
.set, .note {
323321
background-color: ivory;
324322
padding: 16px;
325323
padding-top: 4px;

0 commit comments

Comments
 (0)