25
45
(or the standard input if the filename provided is
27
). It prints various types of output, depending upon the options selected. It is useful for detecting errors both in
47
)\&. It prints various types of output, depending upon the options selected\&. It is useful for detecting errors both in
39
60
accepts the following options (in alphabetical order):
42
Generate a small document for testing purposes.
64
Generate a small document for testing purposes\&.
48
\fBSGML_CATALOG_FILES\fR. Otherwise
72
\fBSGML_CATALOG_FILES\fR\&. Otherwise
50
74
catalogs starting from
51
\fI/etc/xml/catalog\fR
76
are used by default\&.
54
79
\fB\-\-chkregister\fR
55
Turn on node registration. Useful for developers testing
81
Turn on node registration\&. Useful for developers testing
62
compression of output.
90
compression of output\&.
65
Test the internal copy implementation.
95
Test the internal copy implementation\&.
70
102
Canonicalisation (C14N) to serialize the result of parsing to
71
\fIstdout\fR. It keeps comments in the result.
103
stdout\&. It keeps comments in the result\&.
73
106
\fB\-\-dtdvalid \fR\fB\fIURL\fR\fR
80
115
\fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR
83
119
specified by a Formal Public Identifier
85
for validation, note that this will require a catalog exporting that Formal Public Identifier to work.
121
for validation, note that this will require a catalog exporting that Formal Public Identifier to work\&.
88
Parse a file and output an annotated tree of the in\-memory version of the document.
126
Parse a file and output an annotated tree of the in\-memory version of the document\&.
90
129
\fB\-\-debugent\fR
91
Debug the entities defined in the document.
131
Debug the entities defined in the document\&.
101
and populate the tree with inherited attributes.
145
and populate the tree with inherited attributes\&.
103
148
\fB\-\-encode \fR\fB\fIENCODING\fR\fR
104
Output in the given encoding.
150
Output in the given encoding\&.
107
Reformat and reindent the output. The
155
Reformat and reindent the output\&. The
108
156
\fBXMLLINT_INDENT\fR
109
environment variable controls the indentation. The default value is two spaces " ").
157
environment variable controls the indentation\&. The default value is two spaces " ")\&.
112
162
Print out a short usage summary for
120
173
\fB\-\-htmlout\fR
121
175
Output results as an
125
179
to output the necessary
127
tags surrounding the result tree output so the results can be displayed/viewed in a browser.
181
tags surrounding the result tree output so the results can be displayed/viewed in a browser\&.
130
Test for valid insertions.
186
Test for valid insertions\&.
132
189
\fB\-\-loaddtd\fR
133
191
Fetch an external
136
195
\fB\-\-load\-trace\fR
137
197
Display all the documents loaded during the processing to
140
201
\fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
141
Test the parser memory support.
203
Test the parser memory support\&.
143
is the maximum number of bytes the library is allowed to allocate. This can also be used to make sure batch processing of
205
is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of
145
files will not exhaust the virtual memory of the server running them.
207
files will not exhaust the virtual memory of the server running them\&.
150
215
\fB\-\-noblanks\fR
151
Drop ignorable blank spaces.
217
Drop ignorable blank spaces\&.
153
220
\fB\-\-nocatalogs\fR
154
Do not use any catalogs.
222
Do not use any catalogs\&.
156
225
\fB\-\-nocdata\fR
157
Substitute CDATA section by equivalent text nodes.
227
Substitute CDATA section by equivalent text nodes\&.
160
Substitute entity values for entity references. By default,
232
Substitute entity values for entity references\&. By default,
162
leaves entity references in place.
234
leaves entity references in place\&.
165
239
Do not use the Internet to fetch
169
Suppress output. By default,
245
Suppress output\&. By default,
171
outputs the result tree.
247
outputs the result tree\&.
173
250
\fB\-\-nowarning\fR
174
Do not emit warnings from the parser and/or validator.
252
Do not emit warnings from the parser and/or validator\&.
181
262
\fB\-\-noxincludenode\fR
182
Do XInclude processing but do not generate XInclude start and end nodes.
264
Do XInclude processing but do not generate XInclude start and end nodes\&.
184
267
\fB\-\-nsclean\fR
185
Remove redundant namespace declarations.
269
Remove redundant namespace declarations\&.
187
272
\fB\-\-output \fR\fB\fIFILE\fR\fR
188
274
Define a file path where
190
will save the result of parsing. Usually the programs build a tree and save it on
191
\fIstdout\fR, with this option the result
276
will save the result of parsing\&. Usually the programs build a tree and save it on
277
stdout, with this option the result
193
instance will be saved onto a file.
279
instance will be saved onto a file\&.
195
282
\fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
196
284
Use the (space\- or colon\-separated) list of filesystem paths specified by
199
DTDs or entities. Enclose space\-separated lists by quotation marks.
287
DTDs or entities\&. Enclose space\-separated lists by quotation marks\&.
201
290
\fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
202
Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser. It allows to select some nodes in the document based on an XPath (subset) expression. Used for debugging.
292
Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser\&. It allows to select some nodes in the document based on an XPath (subset) expression\&. Used for debugging\&.
204
295
\fB\-\-postvalid\fR
205
Validate after parsing has completed.
297
Validate after parsing has completed\&.
208
Use the push mode of the parser.
302
Use the push mode of the parser\&.
210
305
\fB\-\-recover\fR
211
Output any parsable portions of an invalid document.
307
Output any parsable portions of an invalid document\&.
213
310
\fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR
214
312
Use RelaxNG file named
219
Repeat 100 times, for timing or profiling.
319
Repeat 100 times, for timing or profiling\&.
221
322
\fB\-\-schema \fR\fB\fISCHEMA\fR\fR
224
326
Schema file named
229
Run a navigating shell. Details on available commands in shell mode are below (see
230
the section called \(lqSHELL COMMANDS\(rq).
333
Run a navigating shell\&. Details on available commands in shell mode are below (see
334
the section called \(lqSHELL COMMANDS\(rq)\&.
337
\fB\-\-xpath "\fR\fB\fIXPath_expression\fR\fR\fB"\fR
339
Run an XPath expression given as argument and print the result\&. In case of a nodeset result, each node in the node set is serialized in full in the output\&. In case of an empty node set the "XPath set is empty" result will be shown and an error exit code will be returned\&.
235
346
\- useful when used in combination with
236
347
\fB\-\-relaxng\fR
239
options for validation of files that are too large to be held in memory.
350
options for validation of files that are too large to be held in memory\&.
242
Test user input/output support.
355
Test user input/output support\&.
245
360
Output information about the time it takes
247
to perform the various steps.
362
to perform the various steps\&.
250
Determine if the document is a valid instance of the included Document Type Definition (DTD). A
367
Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A
252
369
to be validated against also can be specified at the command line using the
253
370
\fB\-\-dtdvalid\fR
371
option\&. By default,
256
also checks to determine if the document is well\-formed.
373
also checks to determine if the document is well\-formed\&.
258
376
\fB\-\-version\fR
259
378
Display the version of
264
385
Test the walker module, which is a reader interface but for a document tree, instead of using the reader
266
on an unparsed document it works on an existing in\-memory tree. Used for debugging.
387
on an unparsed document it works on an existing in\-memory tree\&. Used for debugging\&.
268
390
\fB\-\-xinclude\fR
269
Do XInclude processing.
392
Do XInclude processing\&.
272
397
Used in conjunction with
273
\fB\-\-html\fR. Usually when
398
\fB\-\-html\fR\&. Usually when
275
400
is parsed the document is saved with the
277
serializer. But with this option the resulting document is saved with the
402
serializer\&. But with this option the resulting document is saved with the
279
serializer. This is primarily used to generate
404
serializer\&. This is primarily used to generate
284
410
.SH "SHELL COMMANDS"
287
414
offers an interactive shell mode invoked with the
289
command. Available commands in shell mode include (in alphabetical order):
416
command\&. Available commands in shell mode include (in alphabetical order):
299
430
\fBcat \fR\fB\fINODE\fR\fR
300
Display the given node or the current one.
432
Display the given node or the current one\&.
302
435
\fBcd \fR\fB\fIPATH\fR\fR
303
Change the current node to the given path (if unique) or root if no argument is given.
437
Change the current node to the given path (if unique) or root if no argument is given\&.
305
440
\fBdir \fR\fB\fIPATH\fR\fR
306
Dumps information about the node (namespace, attributes, content).
442
Dumps information about the node (namespace, attributes, content)\&.
308
445
\fBdu \fR\fB\fIPATH\fR\fR
309
Show the structure of the subtree under the given path or the current node.
447
Show the structure of the subtree under the given path or the current node\&.
318
Display memory usage.
462
Display memory usage\&.
320
465
\fBload \fR\fB\fIFILENAME\fR\fR
321
Load a new document with the given filename.
467
Load a new document with the given filename\&.
323
470
\fBls \fR\fB\fIPATH\fR\fR
324
List contents of the given path or the current directory.
472
List contents of the given path or the current directory\&.
327
Display the path to the current node.
477
Display the path to the current node\&.
332
485
\fBsave \fR\fB\fIFILENAME\fR\fR
333
Save the current document to the given filename or to the original name.
487
Save the current document to the given filename or to the original name\&.
336
Check the document for errors.
492
Check the document for errors\&.
338
495
\fBwrite \fR\fB\fIFILENAME\fR\fR
339
Write the current node to the given filename.
497
Write the current node to the given filename\&.
340
499
.SH "ENVIRONMENT"
342
501
\fBSGML_CATALOG_FILES\fR
344
catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
504
catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
345
505
\fBSGML_CATALOG_FILES\fR
346
environment variable to a list of catalogs. An empty one should deactivate loading the default
347
\fI/etc/sgml/catalog\fR
506
environment variable to a list of catalogs\&. An empty one should deactivate loading the default
350
511
\fBXML_CATALOG_FILES\fR
352
catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
514
catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
353
515
\fBXML_CATALOG_FILES\fR
354
environment variable to a list of catalogs. An empty one should deactivate loading the default
355
\fI/etc/xml/catalog\fR
516
environment variable to a list of catalogs\&. An empty one should deactivate loading the default
358
521
\fBXML_DEBUG_CATALOG\fR
359
523
Setting the environment variable
360
524
\fBXML_DEBUG_CATALOG\fR
365
command outputs debugging information related to catalog operations.
529
command outputs debugging information related to catalog operations\&.
367
532
\fBXMLLINT_INDENT\fR
368
534
Setting the environment variable
369
535
\fBXMLLINT_INDENT\fR
370
controls the indentation. The default value is two spaces " ".
536
controls the indentation\&. The default value is two spaces " "\&.
371
538
.SH "DIAGNOSTICS"
374
return codes provide information that can be used when calling it from scripts.
542
return codes provide information that can be used when calling it from scripts\&.
393
572
Error in schema compilation
396
577
Error writing output
399
582
Error in pattern (generated when
400
583
\fB\-\-pattern\fR
404
589
Error in Reader registration (generated when
405
590
\fB\-\-chkregister\fR
409
596
Out of memory error
414
602
More information can be found at
419
\fI\%http://www.xmlsoft.org/\fR
614
\m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
425
\fI\%http://www.w3.org/TR/xslt\fR
427
John Fleck <jfleck@inkstain.net>, Ziying Sherwin <sherwin@nlm.nih.gov>, Heiko Rupp <hwr@pilhuhn.de>.
628
\m[blue]\fB\%http://www.w3.org/TR/xslt\fR\m[]
633
\fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
638
\fBZiying Sherwin\fR <\&sherwin@nlm\&.nih\&.gov\&>
643
\fBHeiko Rupp\fR <\&hwr@pilhuhn\&.de\&>
649
Copyright \(co 2001, 2004