11
11
12
12
import org .w3c .css .util .ApplContext ;
13
13
import org .w3c .css .util .HTTPURL ;
14
+ import org .w3c .css .util .Messages ;
14
15
import org .w3c .css .util .Util ;
15
16
import org .w3c .tools .resources .ProtocolException ;
16
17
import org .w3c .www .mime .MimeType ;
23
24
import java .net .URL ;
24
25
import java .util .ArrayList ;
25
26
import java .util .Arrays ;
27
+ import java .util .Collections ;
26
28
import java .util .HashMap ;
27
29
import java .util .Iterator ;
28
30
@@ -94,7 +96,7 @@ public static void main(String args[])
94
96
// first, we get the parameters and create an application context
95
97
try {
96
98
style .getParams (args );
97
- style .ac = new ApplContext (( String ) style .params .get ("lang" ));
99
+ style .ac = new ApplContext (style .params .get ("lang" ));
98
100
System .err .println (style .params );
99
101
} catch (Exception e ) {
100
102
System .out .println ("Usage: java org.w3c.css.css.CssValidator " +
@@ -115,24 +117,40 @@ public static void main(String args[])
115
117
"projection, screen, tty, tv, presentation" );
116
118
System .out .println ("\t -output OUTPUT, --output=OUTPUT" );
117
119
System .out .println ("\t \t Prints the result in the selected format" );
118
- System .out .println ("\t \t Possible values for OUTPUT are text (default), xhtml, " +
119
- "html (same result as xhtml), soap12" );
120
+ System .out .println ("\t \t Possible values for OUTPUT are " );
121
+ System .out .print ("\t \t " );
122
+ System .out .println (StyleSheetGenerator .printAvailableFormatList ("text" ));
120
123
System .out .println ("\t -lang LANG, --lang=LANG" );
121
124
System .out .println ("\t \t Prints the result in the specified language" );
122
- System .out .println ("\t \t Possible values for LANG are " +
123
- "de, en (default), es, fr, ja, ko, nl, zh-cn, pl, it" );
125
+ System .out .println ("\t \t Possible values for LANG are " );
126
+ ArrayList <String > languages_name = Messages .languages_name ;
127
+ Collections .sort (languages_name );
128
+ boolean isFirst = true ;
129
+ for (String s : languages_name ) {
130
+ if (!isFirst ) {
131
+ System .out .print (", " );
132
+ } else {
133
+ System .out .print ("\t \t " );
134
+ isFirst = false ;
135
+ }
136
+ System .out .print (s );
137
+ if ("en" .equals (s )) {
138
+ System .out .print (" (default)" );
139
+ }
140
+ }
141
+ System .out .println ("" );
124
142
System .out .println ("\t -warning WARN, --warning=WARN" );
125
143
System .out .println ("\t \t Warnings verbosity level" );
126
144
System .out .println ("\t \t Possible values for WARN are -1 (no " +
127
- "warning), 0, 1, 2 (default, all the warnings" );
145
+ "warning), 0, 1, 2 (default, all the warnings) " );
128
146
System .out .println ("\t -vextwarning true, --vextwarning=true" );
129
147
System .out .println ("\t \t Treat Vendor Extensions as warnings" );
130
148
System .out .println ("\t \t Possible values for vextwarning are true or false " +
131
- "(default, is false " );
149
+ "(default) " );
132
150
System .out .println ();
133
151
System .out .println ("URL" );
134
152
System .out .println ("\t URL can either represent a distant " +
135
- "web resource (http ://) or a local file (file:/)" );
153
+ "web resource (https ://) or a local file (file:/)" );
136
154
System .out .println ();
137
155
System .out .println ("EXIT STATUS" );
138
156
System .out .println ("return 0 on success, 1 for fatal errors, 10 to 110 for " +
0 commit comments