1
- .\" This manpage has been automatically generated by docbook2man
2
- .\" from a DocBook document. This tool can be found at:
3
- .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4
- .\" Please send any bug reports, improvements, comments, patches,
5
- .\" etc. to Steve Cheng <steve@ggi-project.org>.
6
- .TH "XMLWF" "1" "24 January 2003" "" ""
1
+ '\" -*- coding: us-ascii -*-
2
+ .if \n( .g .ds T< \\F C
3
+ .if \n( .g .ds T> \\F[ \n[ .fam ] ]
4
+ .de URL
5
+ \\$2 \(la \\$1 \(ra \\$3
6
+ ..
7
+ .if \n( .g .mso www.tmac
8
+ .TH XMLWF 1 "March 11, 2016" "" ""
7
9
.SH NAME
8
10
xmlwf \- Determines if an XML document is well-formed
9
11
.SH SYNOPSIS
10
-
11
- \fB xmlwf \fR [ \fB -s \fR ] [ \fB -n \fR ] [ \fB -p \fR ] [ \fB -x \fR ] [ \fB -e \fI encoding \fB\fR ] [ \fB -w \fR ] [ \fB -d \fI output-dir \fB\fR ] [ \fB -c \fR ] [ \fB -m \fR ] [ \fB -r \fR ] [ \fB -t \fR ] [ \fB -v \fR ] [ \fB file ... \fR ]
12
-
13
- .SH "DESCRIPTION"
14
- .PP
12
+ 'nh
13
+ .fi
14
+ .ad l
15
+ \fB xmlwf \fR \k x
16
+ .if (\n x > (\n( .l / 2 )) .nr x (\n( .l / 5 )
17
+ 'in \n( .i u+ \n x u
18
+ [\fB -s \fR ] [\fB -n \fR ] [\fB -p \fR ] [\fB -x \fR ] [\fB -e \fI encoding \fB\fR ] [\fB -w \fR ] [\fB -d \fI output-dir \fB\fR ] [\fB -c \fR ] [\fB -m \fR ] [\fB -r \fR ] [\fB -t \fR ] [\fB -v \fR ] [file ...]
19
+ 'in \n( .i u- \n x u
20
+ .ad b
21
+ 'hy
22
+ .SH DESCRIPTION
15
23
\fB xmlwf \fR uses the Expat library to
16
- determine if an XML document is well-formed. It is
24
+ determine if an XML document is well-formed. It is
17
25
non-validating.
18
26
.PP
19
27
If you do not specify any files on the command-line, and you
20
28
have a recent version of \fB xmlwf \fR , the
21
29
input file will be read from standard input.
22
30
.SH "WELL-FORMED DOCUMENTS"
23
- .PP
24
31
A well-formed document must adhere to the
25
32
following rules:
26
33
.TP 0.2i
27
34
\(bu
28
- The file begins with an XML declaration. For instance,
29
- < ?xml version="1.0" standalone="yes"?>.
30
- \fB NOTE :\fR
35
+ The file begins with an XML declaration. For instance,
36
+ \*( T< < ?xml version="1.0" standalone="yes"?> \*( T > .
37
+ \fI NOTE :\fR
31
38
\fB xmlwf \fR does not currently
32
39
check for a valid XML declaration.
33
40
.TP 0.2i
@@ -36,8 +43,8 @@ Every start tag is either empty (<tag/>)
36
43
or has a corresponding end tag.
37
44
.TP 0.2i
38
45
\(bu
39
- There is exactly one root element. This element must contain
40
- all other elements in the document. Only comments, white
46
+ There is exactly one root element. This element must contain
47
+ all other elements in the document. Only comments, white
41
48
space, and processing instructions may come after the close
42
49
of the root element.
43
50
.TP 0.2i
@@ -49,79 +56,78 @@ All attribute values are enclosed in quotes (either single
49
56
or double).
50
57
.PP
51
58
If the document has a DTD, and it strictly complies with that
52
- DTD, then the document is also considered \fB valid \fR .
59
+ DTD, then the document is also considered \fI valid \fR .
53
60
\fB xmlwf \fR is a non-validating parser --
54
- it does not check the DTD. However, it does support
55
- external entities (see the \fB -x \fR option).
56
- .SH "OPTIONS"
57
- .PP
61
+ it does not check the DTD. However, it does support
62
+ external entities (see the \*( T< \fB \- x \fR \*( T> option).
63
+ .SH OPTIONS
58
64
When an option includes an argument, you may specify the argument either
59
- separately ("\fB -d \fR output") or concatenated with the
60
- option ("\fB -d \fR output "). \fB xmlwf \fR
65
+ separately ("\*( T< \fB \ -d \fR \*( T> output") or concatenated with the
66
+ option ("\*( T< \fB \ -d \fR \*( T> output "). \fB xmlwf \fR
61
67
supports both.
62
- .TP
63
- \fB -c \fR
68
+ .TP
69
+ \*( T< \fB \ -c \fR \*( T>
64
70
If the input file is well-formed and \fB xmlwf \fR
65
71
doesn't encounter any errors, the input file is simply copied to
66
72
the output directory unchanged.
67
- This implies no namespaces (turns off \fB -n \fR ) and
68
- requires \fB -d \fR to specify an output file.
69
- .TP
70
- \fB -d output-dir \fR
73
+ This implies no namespaces (turns off \*( T< \fB \ -n \fR \*( T> ) and
74
+ requires \*( T< \fB \ -d \fR \*( T> to specify an output file.
75
+ .TP
76
+ \*( T< \fB \ -d output \ -dir \fR \*( T>
71
77
Specifies a directory to contain transformed
72
78
representations of the input files.
73
- By default, \fB -d \fR outputs a canonical representation
79
+ By default, \*( T< \fB \ -d \fR \*( T> outputs a canonical representation
74
80
(described below).
75
- You can select different output formats using \fB -c \fR
76
- and \fB -m \fR .
81
+ You can select different output formats using \*( T< \fB \ -c \fR \*( T>
82
+ and \*( T< \fB \ -m \fR \*( T> .
77
83
78
84
The output filenames will
79
85
be exactly the same as the input filenames or "STDIN" if the input is
80
- coming from standard input. Therefore, you must be careful that the
86
+ coming from standard input. Therefore, you must be careful that the
81
87
output file does not go into the same directory as the input
82
- file. Otherwise, \fB xmlwf \fR will delete the
88
+ file. Otherwise, \fB xmlwf \fR will delete the
83
89
input file before it generates the output file (just like running
84
- cat < file > file in most shells).
90
+ \*( T< cat < file > file\*( T> in most shells).
85
91
86
92
Two structurally equivalent XML documents have a byte-for-byte
87
93
identical canonical XML representation.
88
94
Note that ignorable white space is considered significant and
89
95
is treated equivalently to data.
90
96
More on canonical XML can be found at
91
97
http://www.jclark.com/xml/canonxml.html .
92
- .TP
93
- \fB -e encoding \fR
98
+ .TP
99
+ \*( T< \fB \ -e encoding \fR \*( T>
94
100
Specifies the character encoding for the document, overriding
95
- any document encoding declaration. \fB xmlwf \fR
101
+ any document encoding declaration. \fB xmlwf \fR
96
102
supports four built-in encodings:
97
- US -ASCII,
98
- UTF-8 ,
99
- UTF-16, and
100
- ISO-8859-1 .
101
- Also see the \fB -w \fR option.
102
- .TP
103
- \fB -m \fR
103
+ \*( T< US \ - ASCII\*( T> ,
104
+ \*( T< UTF\- 8 \*( T> ,
105
+ \*( T< UTF\ - 16\*( T> , and
106
+ \*( T< ISO\ - 8859\- 1 \*( T> .
107
+ Also see the \*( T< \fB \ -w \fR \*( T> option.
108
+ .TP
109
+ \*( T< \fB \ -m \fR \*( T>
104
110
Outputs some strange sort of XML file that completely
105
111
describes the input file, including character positions.
106
- Requires \fB -d \fR to specify an output file.
107
- .TP
108
- \fB -n \fR
109
- Turns on namespace processing. (describe namespaces)
110
- \fB -c \fR disables namespaces.
111
- .TP
112
- \fB -p \fR
112
+ Requires \*( T< \fB \ -d \fR \*( T> to specify an output file.
113
+ .TP
114
+ \*( T< \fB \ -n \fR \*( T>
115
+ Turns on namespace processing. (describe namespaces)
116
+ \*( T< \fB \ -c \fR \*( T> disables namespaces.
117
+ .TP
118
+ \*( T< \fB \ -p \fR \*( T>
113
119
Tells xmlwf to process external DTDs and parameter
114
120
entities.
115
121
116
122
Normally \fB xmlwf \fR never parses parameter
117
- entities. \fB -p \fR tells it to always parse them.
118
- \fB -p \fR implies \fB -x \fR .
119
- .TP
120
- \fB -r \fR
123
+ entities. \*( T< \fB \ -p \fR \*( T> tells it to always parse them.
124
+ \*( T< \fB \ -p \fR \*( T> implies \*( T< \fB \ -x \fR \*( T> .
125
+ .TP
126
+ \*( T< \fB \ -r \fR \*( T>
121
127
Normally \fB xmlwf \fR memory-maps the XML file
122
128
before parsing; this can result in faster parsing on many
123
129
platforms.
124
- \fB -r \fR turns off memory-mapping and uses normal file
130
+ \*( T< \fB \ -r \fR \*( T> turns off memory-mapping and uses normal file
125
131
IO calls instead.
126
132
Of course, memory-mapping is automatically turned off
127
133
when reading from standard input.
@@ -131,34 +137,33 @@ substantially higher memory usage for
131
137
\fB xmlwf \fR , but this appears to be a matter of
132
138
the operating system reporting memory in a strange way; there is
133
139
not a leak in \fB xmlwf \fR .
134
- .TP
135
- \fB -s \fR
140
+ .TP
141
+ \*( T< \fB \ -s \fR \*( T>
136
142
Prints an error if the document is not standalone.
137
143
A document is standalone if it has no external subset and no
138
144
references to parameter entities.
139
- .TP
140
- \fB -t \fR
141
- Turns on timings. This tells Expat to parse the entire file,
145
+ .TP
146
+ \*( T< \fB \ -t \fR \*( T>
147
+ Turns on timings. This tells Expat to parse the entire file,
142
148
but not perform any processing.
143
149
This gives a fairly accurate idea of the raw speed of Expat itself
144
150
without client overhead.
145
- \fB -t \fR turns off most of the output options
146
- (\fB -d \fR , \fB -m \fR , \fB -c \fR ,
147
- \& ...).
148
- .TP
149
- \fB -v \fR
151
+ \*( T< \fB \- t \fR \*( T> turns off most of the output options
152
+ (\*( T< \fB \- d \fR \*( T> , \*( T< \fB \- m \fR \*( T> , \*( T< \fB \- c \fR \*( T> , ...).
153
+ .TP
154
+ \*( T< \fB \- v \fR \*( T>
150
155
Prints the version of the Expat library being used, including some
151
156
information on the compile-time configuration of the library, and
152
157
then exits.
153
- .TP
154
- \fB -w \fR
158
+ .TP
159
+ \*( T< \fB \ -w \fR \*( T>
155
160
Enables support for Windows code pages.
156
161
Normally, \fB xmlwf \fR will throw an error if it
157
- runs across an encoding that it is not equipped to handle itself. With
158
- \fB -w \fR , xmlwf will try to use a Windows code
159
- page. See also \fB -e \fR .
160
- .TP
161
- \fB -x \fR
162
+ runs across an encoding that it is not equipped to handle itself. With
163
+ \*( T< \fB \ -w \fR \*( T> , xmlwf will try to use a Windows code
164
+ page. See also \*( T< \fB \ -e \fR \*( T> .
165
+ .TP
166
+ \*( T< \fB \ -x \fR \*( T>
162
167
Turns on parsing external entities.
163
168
164
169
Non-validating parsers are not required to resolve external
@@ -178,74 +183,64 @@ This is an example of an internal entity:
178
183
And here are some examples of external entities:
179
184
180
185
.nf
181
- <!ENTITY header SYSTEM "header-&vers;.xml"> (parsed)
186
+ <!ENTITY header SYSTEM "header\ - &vers;.xml"> (parsed)
182
187
<!ENTITY logo SYSTEM "logo.png" PNG> (unparsed)
183
188
.fi
184
- .TP
185
- \fB - -\fR
189
+ .TP
190
+ \*( T< \fB \-\ -\fR \*( T>
186
191
(Two hyphens.)
187
- Terminates the list of options. This is only needed if a filename
188
- starts with a hyphen. For example:
192
+ Terminates the list of options. This is only needed if a filename
193
+ starts with a hyphen. For example:
189
194
190
195
.nf
191
- xmlwf -- -myfile.xml
196
+ xmlwf \-\- \ - myfile.xml
192
197
.fi
193
198
194
199
will run \fB xmlwf \fR on the file
195
- \fI -myfile.xml \fR .
200
+ \*( T< \fI \ -myfile.xml \fR \*( T> .
196
201
.PP
197
202
Older versions of \fB xmlwf \fR do not support
198
203
reading from standard input.
199
- .SH "OUTPUT"
200
- .PP
204
+ .SH OUTPUT
201
205
If an input file is not well-formed,
202
206
\fB xmlwf \fR prints a single line describing
203
- the problem to standard output. If a file is well formed,
207
+ the problem to standard output. If a file is well formed,
204
208
\fB xmlwf \fR outputs nothing.
205
- Note that the result code is \fB not \fR set.
206
- .SH "BUGS"
207
- .PP
208
- According to the W3C standard, an XML file without a
209
- declaration at the beginning is not considered well-formed.
210
- However, \fB xmlwf \fR allows this to pass.
211
- .PP
209
+ Note that the result code is \fI not \fR set.
210
+ .SH BUGS
212
211
\fB xmlwf \fR returns a 0 - noerr result,
213
- even if the file is not well-formed. There is no good way for
212
+ even if the file is not well-formed. There is no good way for
214
213
a program to use \fB xmlwf \fR to quickly
215
214
check a file -- it must parse \fB xmlwf \fR 's
216
215
standard output.
217
216
.PP
218
217
The errors should go to standard error, not standard output.
219
218
.PP
220
- There should be a way to get \fB -d \fR to send its
219
+ There should be a way to get \*( T< \fB \ -d \fR \*( T> to send its
221
220
output to standard output rather than forcing the user to send
222
221
it to a file.
223
222
.PP
224
223
I have no idea why anyone would want to use the
225
- \fB -d \fR , \fB -c \fR , and
226
- \fB -m \fR options. If someone could explain it to
224
+ \*( T< \fB \ -d \fR \*( T> , \*( T< \fB \ -c \fR \*( T> , and
225
+ \*( T< \fB \ -m \fR \*( T> options. If someone could explain it to
227
226
me, I'd like to add this information to this manpage.
228
- .SH "ALTERNATIVES"
229
- .PP
227
+ .SH ALTERNATIVES
230
228
Here are some XML validators on the web:
231
229
232
230
.nf
233
- http://www.hcrc.ed.ac.uk/~richard/xml-check.html
231
+ http://www.hcrc.ed.ac.uk/~richard/xml\ - check.html
234
232
http://www.stg.brown.edu/service/xmlvalid/
235
233
http://www.scripting.com/frontier5/xml/code/xmlValidator.html
236
234
http://www.xml.com/pub/a/tools/ruwf/check.html
237
235
.fi
238
236
.SH "SEE ALSO"
239
- .PP
240
-
241
237
.nf
242
238
The Expat home page: http://www.libexpat.org/
243
- The W3 XML specification: http://www.w3.org/TR/REC-xml
239
+ The W3 XML specification: http://www.w3.org/TR/REC\ - xml
244
240
.fi
245
- .SH "AUTHOR"
246
- .PP
247
- This manual page was written by Scott Bronson <bronson@rinspin.com> for
248
- the Debian GNU/Linux system (but may be used by others). Permission is
241
+ .SH AUTHOR
242
+ This manual page was written by Scott Bronson <\*( T< bronson@rinspin.com\*( T> > for
243
+ the Debian GNU/Linux system (but may be used by others). Permission is
249
244
granted to copy, distribute and/or modify this document under
250
245
the terms of the GNU Free Documentation
251
246
License, Version 1.1.
0 commit comments