1
1
<!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 >
3
3
< body >
4
4
< h1 > How to use the vnu.jar validator</ h1 >
5
5
6
- < p > The < code > vnu.jar</ code > validator is a packaged standalone
6
+ < p > The < code > vnu.jar</ code > application is a portable standalone
7
7
version of the
8
8
< a href ="http://about.validator.nu/ "> validator.nu</ a >
9
- code . The
9
+ validator . The
10
10
< a href ="https://github.com/validator/validator.github.io/releases "
11
11
> latest version</ a >
12
12
is available from the
13
13
< a href ="https://github.com/validator/validator.github.io/ "
14
14
> validator area at github</ a > .
15
15
The following are instructions on how to use it to validate documents.
16
16
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
+
17
21
< p class =links >
18
22
Command-line:
19
23
< a href ="#command-line-usage "> usage</ a > ·
@@ -32,26 +36,26 @@ <h2>Command-line usage</h2>
32
36
command-line validation of HTML documents by invoking it like this:
33
37
34
38
< pre >
35
- java -jar vnu.jar [--html] [--entities] [--schema URL]
39
+ java -jar ~/ vnu.jar [--help] [--html] [--entities] [--schema URL]
36
40
[--format gnu|xml|json|text] [--verbose] [--version] FILES
37
41
</ pre >
38
42
39
43
< p > To validate one or more documents from the command line:
40
44
41
45
< 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...
43
47
</ pre >
44
48
45
49
< p > To validate all HTML documents in a particular directory:
46
50
47
51
< pre >
48
- java -jar vnu.jar some-directory-name/
52
+ java -jar ~/ vnu.jar some-directory-name/
49
53
</ pre >
50
54
51
55
< p > To validate a Web document:
52
56
53
57
< pre >
54
- java -jar vnu.jar http://example.com/foo
58
+ java -jar ~/ vnu.jar http://example.com/foo
55
59
</ pre >
56
60
57
61
< h3 id ="command-line-options "> Command-line options</ h3 >
@@ -121,7 +125,7 @@ <h2>Web-based usage</h2>
121
125
and invoke < code > vnu.jar</ code > like this:
122
126
123
127
< 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 >
125
129
</ pre >
126
130
127
131
< p > Then open
@@ -145,22 +149,22 @@ <h2>HTTP client (for fast command-line validation)</h2>
145
149
146
150
< li > Open a new terminal window and start up the validator as an HTTP
147
151
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.
149
153
150
154
< li > Open a second new terminal window and invoke < code > vnu.jar</ code >
151
155
like this:
152
156
153
157
< 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...
155
159
</ pre >
156
160
</ ol >
157
161
158
162
< h3 id ="http-client-options "> HTTP client options</ h3 >
159
163
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
161
165
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.
164
168
165
169
< p > For example, you can suppress warning-level validation messages and only
166
170
show error-level ones by setting the value of the
@@ -169,7 +173,7 @@ <h3 id="http-client-options">HTTP client options</h3>
169
173
170
174
< pre >
171
175
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...
173
177
</ pre >
174
178
175
179
< 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>
184
188
default: < span class =option-value > "127.0.0.1"</ span >
185
189
</ pre >
186
190
187
-
188
191
< h4 id ="nuvalidatorclientport "> nu.validator.client.port</ h4 >
189
192
< pre >
190
193
Specifies the hostname of the validator for the client to connect to.
191
194
192
195
default: < span class =option-value > "8888"</ span >
193
196
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
195
198
</ pre >
196
199
197
-
198
200
< h4 id ="nuvalidatorclientlevel "> nu.validator.client.level</ h4 >
199
201
< pre >
200
202
Specifies the severity level of validation messages to report; to
@@ -205,10 +207,9 @@ <h4 id="nuvalidatorclientlevel">nu.validator.client.level</h4>
205
207
206
208
possible values: < span class =option-value > "error"</ span >
207
209
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
209
211
</ pre >
210
212
211
-
212
213
< h4 id ="nuvalidatorclientparser "> nu.validator.client.parser</ h4 >
213
214
< pre >
214
215
Specifies which parser to use.
@@ -218,23 +219,20 @@ <h4 id="nuvalidatorclientparser">nu.validator.client.parser</h4>
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 >
219
220
</ pre >
220
221
221
-
222
222
< h4 id ="nuvalidatorclientcharset "> nu.validator.client.charset</ h4 >
223
223
< pre >
224
224
Specifies the encoding of the input document.
225
225
226
226
default: [unset]
227
227
</ pre >
228
228
229
-
230
229
< h4 id ="nuvalidatorclientcontent-type "> nu.validator.client.content-type</ h4 >
231
230
< pre >
232
231
Specifies the content-type of the input document.
233
232
234
233
default: < span class =option-value > "text/html"</ span > ; or, for *.xhtml files, < span class =option-value > "application/xhtml+xml"</ span >
235
234
</ pre >
236
235
237
-
238
236
< h4 id ="nuvalidatorclientout "> nu.validator.client.out</ h4 >
239
237
< pre >
240
238
Specifies the output format for validation messages.
@@ -319,7 +317,7 @@ <h4 id="nuvalidatorclientasciiquotes">nu.validator.client.asciiquotes</h4>
319
317
background-color : white;
320
318
color : black;
321
319
}
322
- .set {
320
+ .set , . note {
323
321
background-color : ivory;
324
322
padding : 16px ;
325
323
padding-top : 4px ;
0 commit comments