blob: 540a114ff32230b6b4ed39bd741eb63db3a09bd5 [file] [log] [blame]
Daniel Veillard113384f2013-03-27 11:43:41 +08001'\" t
2.\" Title: xmllint
3.\" Author: John Fleck <jfleck@inkstain.net>
Daniel Veillarde59c2442013-12-11 00:01:38 +08004.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
Daniel Veillard113384f2013-03-27 11:43:41 +08005.\" Date: $Date$
6.\" Manual: xmllint Manual
7.\" Source: libxml2
8.\" Language: English
9.\"
10.TH "XMLLINT" "1" "$Date$" "libxml2" "xmllint Manual"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
Daniel Veillardbf95fd22006-04-06 08:22:51 +000023.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
Daniel Veillard113384f2013-03-27 11:43:41 +080027.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
Daniel Veillardbf95fd22006-04-06 08:22:51 +000030.SH "NAME"
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000031xmllint \- command line XML tool
32.SH "SYNOPSIS"
Daniel Veillard113384f2013-03-27 11:43:41 +080033.HP \w'\fBxmllint\fR\ 'u
34\fBxmllint\fR [\fB\-\-version\fR | \fB\-\-debug\fR | \fB\-\-shell\fR | \fB\-\-xpath\ "\fR\fB\fIXPath_expression\fR\fR\fB"\fR | \fB\-\-debugent\fR | \fB\-\-copy\fR | \fB\-\-recover\fR | \fB\-\-noent\fR | \fB\-\-noout\fR | \fB\-\-nonet\fR | \fB\-\-path\ "\fR\fB\fIPATH(S)\fR\fR\fB"\fR | \fB\-\-load\-trace\fR | \fB\-\-htmlout\fR | \fB\-\-nowrap\fR | \fB\-\-valid\fR | \fB\-\-postvalid\fR | \fB\-\-dtdvalid\ \fR\fB\fIURL\fR\fR | \fB\-\-dtdvalidfpi\ \fR\fB\fIFPI\fR\fR | \fB\-\-timing\fR | \fB\-\-output\ \fR\fB\fIFILE\fR\fR | \fB\-\-repeat\fR | \fB\-\-insert\fR | \fB\-\-compress\fR | \fB\-\-html\fR | \fB\-\-xmlout\fR | \fB\-\-push\fR | \fB\-\-memory\fR | \fB\-\-maxmem\ \fR\fB\fINBBYTES\fR\fR | \fB\-\-nowarning\fR | \fB\-\-noblanks\fR | \fB\-\-nocdata\fR | \fB\-\-format\fR | \fB\-\-encode\ \fR\fB\fIENCODING\fR\fR | \fB\-\-dropdtd\fR | \fB\-\-nsclean\fR | \fB\-\-testIO\fR | \fB\-\-catalogs\fR | \fB\-\-nocatalogs\fR | \fB\-\-auto\fR | \fB\-\-xinclude\fR | \fB\-\-noxincludenode\fR | \fB\-\-loaddtd\fR | \fB\-\-dtdattr\fR | \fB\-\-stream\fR | \fB\-\-walker\fR | \fB\-\-pattern\ \fR\fB\fIPATTERNVALUE\fR\fR | \fB\-\-chkregister\fR | \fB\-\-relaxng\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-schema\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-c14n\fR] {\fIXML\-FILE(S)\fR... | \-}
35.HP \w'\fBxmllint\fR\ 'u
Daniel Veillard51698c72006-04-06 14:02:42 +000036\fBxmllint\fR \fB\-\-help\fR
Daniel Veillard6464d6a2006-02-19 21:35:39 +000037.SH "DESCRIPTION"
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000038.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +000039The
40\fBxmllint\fR
Daniel Veillardad211982006-08-21 08:34:11 +000041program parses one or more
42XML
43files, specified on the command line as
Daniel Veillardbf95fd22006-04-06 08:22:51 +000044\fIXML\-FILE\fR
45(or the standard input if the filename provided is
46\fB\-\fR
Daniel Veillard113384f2013-03-27 11:43:41 +080047)\&. It prints various types of output, depending upon the options selected\&. It is useful for detecting errors both in
Daniel Veillardbf95fd22006-04-06 08:22:51 +000048XML
49code and in the
50XML
Daniel Veillard113384f2013-03-27 11:43:41 +080051parser itself\&.
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000052.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +000053\fBxmllint\fR
54is included in
Daniel Veillard113384f2013-03-27 11:43:41 +080055\fBlibxml\fR(3)\&.
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000056.SH "OPTIONS"
Daniel Veillard46f97212006-02-20 08:58:51 +000057.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +000058\fBxmllint\fR
59accepts the following options (in alphabetical order):
Daniel Veillard113384f2013-03-27 11:43:41 +080060.PP
MST 2004 John Flecke42ae6f2004-02-27 03:26:30 +000061\fB\-\-auto\fR
Daniel Veillard113384f2013-03-27 11:43:41 +080062.RS 4
63Generate a small document for testing purposes\&.
64.RE
65.PP
Daniel Veillard46f97212006-02-20 08:58:51 +000066\fB\-\-catalogs\fR
Daniel Veillard113384f2013-03-27 11:43:41 +080067.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +000068Use the
69SGML
70catalog(s) from
Daniel Veillard113384f2013-03-27 11:43:41 +080071\fBSGML_CATALOG_FILES\fR\&. Otherwise
Daniel Veillardad211982006-08-21 08:34:11 +000072XML
73catalogs starting from
Daniel Veillard113384f2013-03-27 11:43:41 +080074/etc/xml/catalog
75are used by default\&.
76.RE
77.PP
MST 2004 John Flecke42ae6f2004-02-27 03:26:30 +000078\fB\-\-chkregister\fR
Daniel Veillard113384f2013-03-27 11:43:41 +080079.RS 4
80Turn on node registration\&. Useful for developers testing
Daniel Veillardbf95fd22006-04-06 08:22:51 +000081\fBlibxml\fR(3)
Daniel Veillard113384f2013-03-27 11:43:41 +080082node tracking code\&.
83.RE
84.PP
Daniel Veillard46f97212006-02-20 08:58:51 +000085\fB\-\-compress\fR
Daniel Veillard113384f2013-03-27 11:43:41 +080086.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +000087Turn on
Daniel Veillardad211982006-08-21 08:34:11 +000088\fBgzip\fR(1)
Daniel Veillard113384f2013-03-27 11:43:41 +080089compression of output\&.
90.RE
91.PP
Daniel Veillard46f97212006-02-20 08:58:51 +000092\fB\-\-copy\fR
Daniel Veillard113384f2013-03-27 11:43:41 +080093.RS 4
94Test the internal copy implementation\&.
95.RE
96.PP
MDT 2004 John Fleck774a3bd2004-08-15 00:54:21 +000097\fB\-\-c14n\fR
Daniel Veillard113384f2013-03-27 11:43:41 +080098.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +000099Use the W3C
100XML
101Canonicalisation (C14N) to serialize the result of parsing to
Daniel Veillard113384f2013-03-27 11:43:41 +0800102stdout\&. It keeps comments in the result\&.
103.RE
104.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000105\fB\-\-dtdvalid \fR\fB\fIURL\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800106.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000107Use the
108DTD
109specified by an
110\fIURL\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800111for validation\&.
112.RE
113.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000114\fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800115.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000116Use the
117DTD
Daniel Veillardad211982006-08-21 08:34:11 +0000118specified by a Formal Public Identifier
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000119\fIFPI\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800120for validation, note that this will require a catalog exporting that Formal Public Identifier to work\&.
121.RE
122.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000123\fB\-\-debug\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800124.RS 4
125Parse a file and output an annotated tree of the in\-memory version of the document\&.
126.RE
127.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000128\fB\-\-debugent\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800129.RS 4
130Debug the entities defined in the document\&.
131.RE
132.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000133\fB\-\-dropdtd\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800134.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000135Remove
136DTD
Daniel Veillard113384f2013-03-27 11:43:41 +0800137from output\&.
138.RE
139.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000140\fB\-\-dtdattr\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800141.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000142Fetch external
143DTD
Daniel Veillard113384f2013-03-27 11:43:41 +0800144and populate the tree with inherited attributes\&.
145.RE
146.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000147\fB\-\-encode \fR\fB\fIENCODING\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800148.RS 4
Daniel Veillarde59c2442013-12-11 00:01:38 +0800149Output in the given encoding\&. Note that this works for full document not fragments or result from XPath queries\&.
Daniel Veillard113384f2013-03-27 11:43:41 +0800150.RE
151.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000152\fB\-\-format\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800153.RS 4
154Reformat and reindent the output\&. The
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000155\fBXMLLINT_INDENT\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800156environment variable controls the indentation\&. The default value is two spaces " ")\&.
157.RE
158.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000159\fB\-\-help\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800160.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000161Print out a short usage summary for
Daniel Veillard113384f2013-03-27 11:43:41 +0800162\fBxmllint\fR\&.
163.RE
164.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000165\fB\-\-html\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800166.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000167Use the
168HTML
Daniel Veillard113384f2013-03-27 11:43:41 +0800169parser\&.
170.RE
171.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000172\fB\-\-htmlout\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800173.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000174Output results as an
175HTML
Daniel Veillard113384f2013-03-27 11:43:41 +0800176file\&. This causes
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000177\fBxmllint\fR
178to output the necessary
179HTML
Daniel Veillard113384f2013-03-27 11:43:41 +0800180tags surrounding the result tree output so the results can be displayed/viewed in a browser\&.
181.RE
182.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000183\fB\-\-insert\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800184.RS 4
185Test for valid insertions\&.
186.RE
187.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000188\fB\-\-loaddtd\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800189.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +0000190Fetch an external
Daniel Veillard113384f2013-03-27 11:43:41 +0800191DTD\&.
192.RE
193.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000194\fB\-\-load\-trace\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800195.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000196Display all the documents loaded during the processing to
Daniel Veillard113384f2013-03-27 11:43:41 +0800197stderr\&.
198.RE
199.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000200\fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800201.RS 4
202Test the parser memory support\&.
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000203\fINNBYTES\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800204is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000205XML
Daniel Veillard113384f2013-03-27 11:43:41 +0800206files will not exhaust the virtual memory of the server running them\&.
207.RE
208.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000209\fB\-\-memory\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800210.RS 4
211Parse from memory\&.
212.RE
213.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000214\fB\-\-noblanks\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800215.RS 4
216Drop ignorable blank spaces\&.
217.RE
218.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000219\fB\-\-nocatalogs\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800220.RS 4
221Do not use any catalogs\&.
222.RE
223.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000224\fB\-\-nocdata\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800225.RS 4
226Substitute CDATA section by equivalent text nodes\&.
227.RE
228.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000229\fB\-\-noent\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800230.RS 4
231Substitute entity values for entity references\&. By default,
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000232\fBxmllint\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800233leaves entity references in place\&.
234.RE
235.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000236\fB\-\-nonet\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800237.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000238Do not use the Internet to fetch
Daniel Veillard113384f2013-03-27 11:43:41 +0800239DTDs or entities\&.
240.RE
241.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000242\fB\-\-noout\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800243.RS 4
244Suppress output\&. By default,
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000245\fBxmllint\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800246outputs the result tree\&.
247.RE
248.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000249\fB\-\-nowarning\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800250.RS 4
251Do not emit warnings from the parser and/or validator\&.
252.RE
253.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000254\fB\-\-nowrap\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800255.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000256Do not output
257HTML
Daniel Veillard113384f2013-03-27 11:43:41 +0800258doc wrapper\&.
259.RE
260.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000261\fB\-\-noxincludenode\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800262.RS 4
263Do XInclude processing but do not generate XInclude start and end nodes\&.
264.RE
265.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000266\fB\-\-nsclean\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800267.RS 4
268Remove redundant namespace declarations\&.
269.RE
270.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000271\fB\-\-output \fR\fB\fIFILE\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800272.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000273Define a file path where
274\fBxmllint\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800275will save the result of parsing\&. Usually the programs build a tree and save it on
276stdout, with this option the result
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000277XML
Daniel Veillard113384f2013-03-27 11:43:41 +0800278instance will be saved onto a file\&.
279.RE
280.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000281\fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800282.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000283Use the (space\- or colon\-separated) list of filesystem paths specified by
284\fIPATHS\fR
285to load
Daniel Veillard113384f2013-03-27 11:43:41 +0800286DTDs or entities\&. Enclose space\-separated lists by quotation marks\&.
287.RE
288.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000289\fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800290.RS 4
291Used 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.RE
293.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000294\fB\-\-postvalid\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800295.RS 4
296Validate after parsing has completed\&.
297.RE
298.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000299\fB\-\-push\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800300.RS 4
301Use the push mode of the parser\&.
302.RE
303.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000304\fB\-\-recover\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800305.RS 4
306Output any parsable portions of an invalid document\&.
307.RE
308.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000309\fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800310.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000311Use RelaxNG file named
312\fISCHEMA\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800313for validation\&.
314.RE
315.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000316\fB\-\-repeat\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800317.RS 4
318Repeat 100 times, for timing or profiling\&.
319.RE
320.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000321\fB\-\-schema \fR\fB\fISCHEMA\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800322.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +0000323Use a W3C
324XML
325Schema file named
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000326\fISCHEMA\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800327for validation\&.
328.RE
329.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000330\fB\-\-shell\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800331.RS 4
332Run a navigating shell\&. Details on available commands in shell mode are below (see
333the section called \(lqSHELL COMMANDS\(rq)\&.
334.RE
335.PP
336\fB\-\-xpath "\fR\fB\fIXPath_expression\fR\fR\fB"\fR
337.RS 4
338Run 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\&.
339.RE
340.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000341\fB\-\-stream\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800342.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +0000343Use streaming
344API
345\- useful when used in combination with
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000346\fB\-\-relaxng\fR
347or
348\fB\-\-valid\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800349options for validation of files that are too large to be held in memory\&.
350.RE
351.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000352\fB\-\-testIO\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800353.RS 4
354Test user input/output support\&.
355.RE
356.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000357\fB\-\-timing\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800358.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000359Output information about the time it takes
360\fBxmllint\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800361to perform the various steps\&.
362.RE
363.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000364\fB\-\-valid\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800365.RS 4
366Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000367DTD
368to be validated against also can be specified at the command line using the
369\fB\-\-dtdvalid\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800370option\&. By default,
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000371\fBxmllint\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800372also checks to determine if the document is well\-formed\&.
373.RE
374.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000375\fB\-\-version\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800376.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000377Display the version of
378\fBlibxml\fR(3)
Daniel Veillard113384f2013-03-27 11:43:41 +0800379used\&.
380.RE
381.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000382\fB\-\-walker\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800383.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000384Test the walker module, which is a reader interface but for a document tree, instead of using the reader
385API
Daniel Veillard113384f2013-03-27 11:43:41 +0800386on an unparsed document it works on an existing in\-memory tree\&. Used for debugging\&.
387.RE
388.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000389\fB\-\-xinclude\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800390.RS 4
391Do XInclude processing\&.
392.RE
393.PP
Daniel Veillard46f97212006-02-20 08:58:51 +0000394\fB\-\-xmlout\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800395.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000396Used in conjunction with
Daniel Veillard113384f2013-03-27 11:43:41 +0800397\fB\-\-html\fR\&. Usually when
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000398HTML
399is parsed the document is saved with the
400HTML
Daniel Veillard113384f2013-03-27 11:43:41 +0800401serializer\&. But with this option the resulting document is saved with the
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000402XML
Daniel Veillard113384f2013-03-27 11:43:41 +0800403serializer\&. This is primarily used to generate
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000404XHTML
405from
406HTML
Daniel Veillard113384f2013-03-27 11:43:41 +0800407input\&.
408.RE
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000409.SH "SHELL COMMANDS"
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000410.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000411\fBxmllint\fR
412offers an interactive shell mode invoked with the
413\fB\-\-shell\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800414command\&. Available commands in shell mode include (in alphabetical order):
415.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000416\fBbase\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800417.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000418Display
419XML
Daniel Veillard113384f2013-03-27 11:43:41 +0800420base of the node\&.
421.RE
422.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000423\fBbye\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800424.RS 4
425Leave the shell\&.
426.RE
427.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000428\fBcat \fR\fB\fINODE\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800429.RS 4
430Display the given node or the current one\&.
431.RE
432.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000433\fBcd \fR\fB\fIPATH\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800434.RS 4
435Change the current node to the given path (if unique) or root if no argument is given\&.
436.RE
437.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000438\fBdir \fR\fB\fIPATH\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800439.RS 4
440Dumps information about the node (namespace, attributes, content)\&.
441.RE
442.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000443\fBdu \fR\fB\fIPATH\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800444.RS 4
445Show the structure of the subtree under the given path or the current node\&.
446.RE
447.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000448\fBexit\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800449.RS 4
450Leave the shell\&.
451.RE
452.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000453\fBhelp\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800454.RS 4
455Show this help\&.
456.RE
457.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000458\fBfree\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800459.RS 4
460Display memory usage\&.
461.RE
462.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000463\fBload \fR\fB\fIFILENAME\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800464.RS 4
465Load a new document with the given filename\&.
466.RE
467.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000468\fBls \fR\fB\fIPATH\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800469.RS 4
470List contents of the given path or the current directory\&.
471.RE
472.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000473\fBpwd\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800474.RS 4
475Display the path to the current node\&.
476.RE
477.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000478\fBquit\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800479.RS 4
480Leave the shell\&.
481.RE
482.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000483\fBsave \fR\fB\fIFILENAME\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800484.RS 4
485Save the current document to the given filename or to the original name\&.
486.RE
487.PP
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000488\fBvalidate\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800489.RS 4
490Check the document for errors\&.
491.RE
492.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000493\fBwrite \fR\fB\fIFILENAME\fR\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800494.RS 4
495Write the current node to the given filename\&.
496.RE
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000497.SH "ENVIRONMENT"
Daniel Veillard113384f2013-03-27 11:43:41 +0800498.PP
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000499\fBSGML_CATALOG_FILES\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800500.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +0000501SGML
Daniel Veillard113384f2013-03-27 11:43:41 +0800502catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
Daniel Veillardad211982006-08-21 08:34:11 +0000503\fBSGML_CATALOG_FILES\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800504environment variable to a list of catalogs\&. An empty one should deactivate loading the default
505/etc/sgml/catalog
506catalog\&.
507.RE
508.PP
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000509\fBXML_CATALOG_FILES\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800510.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +0000511XML
Daniel Veillard113384f2013-03-27 11:43:41 +0800512catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000513\fBXML_CATALOG_FILES\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800514environment variable to a list of catalogs\&. An empty one should deactivate loading the default
515/etc/xml/catalog
516catalog\&.
517.RE
518.PP
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000519\fBXML_DEBUG_CATALOG\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800520.RS 4
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000521Setting the environment variable
522\fBXML_DEBUG_CATALOG\fR
Daniel Veillardad211982006-08-21 08:34:11 +0000523to
524\fInon\-zero\fR
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000525using the
526\fBexport\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800527command outputs debugging information related to catalog operations\&.
528.RE
529.PP
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000530\fBXMLLINT_INDENT\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800531.RS 4
Daniel Veillardad211982006-08-21 08:34:11 +0000532Setting the environment variable
533\fBXMLLINT_INDENT\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800534controls the indentation\&. The default value is two spaces " "\&.
535.RE
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000536.SH "DIAGNOSTICS"
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000537.PP
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000538\fBxmllint\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800539return codes provide information that can be used when calling it from scripts\&.
540.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000541\fB0\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800542.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000543No error
Daniel Veillard113384f2013-03-27 11:43:41 +0800544.RE
545.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000546\fB1\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800547.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000548Unclassified
Daniel Veillard113384f2013-03-27 11:43:41 +0800549.RE
550.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000551\fB2\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800552.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000553Error in
554DTD
Daniel Veillard113384f2013-03-27 11:43:41 +0800555.RE
556.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000557\fB3\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800558.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000559Validation error
Daniel Veillard113384f2013-03-27 11:43:41 +0800560.RE
561.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000562\fB4\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800563.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000564Validation error
Daniel Veillard113384f2013-03-27 11:43:41 +0800565.RE
566.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000567\fB5\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800568.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000569Error in schema compilation
Daniel Veillard113384f2013-03-27 11:43:41 +0800570.RE
571.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000572\fB6\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800573.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000574Error writing output
Daniel Veillard113384f2013-03-27 11:43:41 +0800575.RE
576.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000577\fB7\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800578.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000579Error in pattern (generated when
580\fB\-\-pattern\fR
581option is used)
Daniel Veillard113384f2013-03-27 11:43:41 +0800582.RE
583.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000584\fB8\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800585.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000586Error in Reader registration (generated when
587\fB\-\-chkregister\fR
588option is used)
Daniel Veillard113384f2013-03-27 11:43:41 +0800589.RE
590.PP
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000591\fB9\fR
Daniel Veillard113384f2013-03-27 11:43:41 +0800592.RS 4
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000593Out of memory error
Daniel Veillard113384f2013-03-27 11:43:41 +0800594.RE
Daniel Veillard1589e8d2006-04-06 12:57:09 +0000595.SH "SEE ALSO"
Daniel Veillardbf95fd22006-04-06 08:22:51 +0000596.PP
597\fBlibxml\fR(3)
Daniel Veillardad211982006-08-21 08:34:11 +0000598.PP
599More information can be found at
Daniel Veillard113384f2013-03-27 11:43:41 +0800600.sp
601.RS 4
602.ie n \{\
603\h'-04'\(bu\h'+03'\c
604.\}
605.el \{\
606.sp -1
607.IP \(bu 2.3
608.\}
Daniel Veillardad211982006-08-21 08:34:11 +0000609\fBlibxml\fR(3)
610web page
Daniel Veillard113384f2013-03-27 11:43:41 +0800611\m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
612.RE
613.sp
614.RS 4
615.ie n \{\
616\h'-04'\(bu\h'+03'\c
617.\}
618.el \{\
619.sp -1
620.IP \(bu 2.3
621.\}
Daniel Veillardad211982006-08-21 08:34:11 +0000622W3C
623XSLT
624page
Daniel Veillard113384f2013-03-27 11:43:41 +0800625\m[blue]\fB\%http://www.w3.org/TR/xslt\fR\m[]
626.RE
627.sp
628.SH "AUTHORS"
629.PP
630\fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
631.RS 4
632Author.
633.RE
634.PP
635\fBZiying Sherwin\fR <\&sherwin@nlm\&.nih\&.gov\&>
636.RS 4
637Author.
638.RE
639.PP
640\fBHeiko Rupp\fR <\&hwr@pilhuhn\&.de\&>
641.RS 4
642Author.
643.RE
644.SH "COPYRIGHT"
645.br
646Copyright \(co 2001, 2004
647.br