blob: c0d6ebaaee836281dad25203cf0b1911a355cf81 [file] [log] [blame]
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +00001<?xml version="1.0"?>
Daniel Veillardfd583412003-04-25 13:22:10 +00002<?xml-stylesheet type="text/xsl"
3 href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +00004<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
5 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
Daniel Veillard6464d6a2006-02-19 21:35:39 +00006
7 <!ENTITY xmllint "<command>xmllint</command>">
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +00008]>
Daniel Veillard46f97212006-02-20 08:58:51 +00009
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000010<refentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000011
Daniel Veillard46f97212006-02-20 08:58:51 +000012<refentryinfo>
13 <title>xmllint Manual</title>
14 <productname>libxml2</productname>
15 <copyright>
16 <year>2001</year>
17 <year>2004</year>
18 </copyright>
19 <authorgroup>
20 <author>
21 <firstname>John</firstname>
22 <surname>Fleck</surname>
23 <affiliation>
24 <address>
25 <email>jfleck@inkstain.net</email>
26 </address>
27 </affiliation>
28 </author>
29 <author>
30 <firstname>Ziying</firstname>
31 <surname>Sherwin</surname>
32 <affiliation>
33 <address>
34 <email>sherwin@nlm.nih.gov</email>
35 </address>
36 </affiliation>
37 </author>
38 <author>
39 <firstname>Heiko</firstname>
40 <surname>Rupp</surname>
41 <affiliation>
42 <address>
43 <email>hwr@pilhuhn.de</email>
44 </address>
45 </affiliation>
46 </author>
47 </authorgroup>
48 <releaseinfo>This is release 0.5 of the xmllint Manual.</releaseinfo>
49 <!-- date should be the date of the latest change or the release version -->
50 <date>2006-02-20</date>
51</refentryinfo>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000052
Daniel Veillard46f97212006-02-20 08:58:51 +000053<refmeta>
54 <refentrytitle>xmllint</refentrytitle>
55 <manvolnum>1</manvolnum>
56</refmeta>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000057
Daniel Veillard46f97212006-02-20 08:58:51 +000058<refnamediv>
59 <refname>xmllint</refname>
60 <refpurpose>command line <acronym>XML</acronym> tool</refpurpose>
61</refnamediv>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000062
Daniel Veillard46f97212006-02-20 08:58:51 +000063<refsynopsisdiv>
64 <cmdsynopsis>
65 <command>xmllint</command>
66 <group choice="opt">
67 <arg choice="plain"><option>--version</option></arg>
68 <arg choice="plain"><option>--debug</option></arg>
69 <arg choice="plain"><option>--shell</option></arg>
70 <arg choice="plain"><option>--debugent</option></arg>
71 <arg choice="plain"><option>--copy</option></arg>
72 <arg choice="plain"><option>--recover</option></arg>
73 <arg choice="plain"><option>--noent</option></arg>
74 <arg choice="plain"><option>--noout</option></arg>
75 <arg choice="plain"><option>--nonet</option></arg>
76 <arg choice="plain"><option>--path <replaceable class="option">"PATHS"</replaceable></option></arg>
77 <arg choice="plain"><option>--load-trace</option></arg>
78 <arg choice="plain"><option>--htmlout</option></arg>
79 <arg choice="plain"><option>--nowrap</option></arg>
80 <arg choice="plain"><option>--valid</option></arg>
81 <arg choice="plain"><option>--postvalid</option></arg>
82 <arg choice="plain"><option>--dtdvalid <replaceable class="option">URL</replaceable></option></arg>
83 <arg choice="plain"><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></arg>
84 <arg choice="plain"><option>--timing</option></arg>
85 <arg choice="plain"><option>--output <replaceable class="option">FILE</replaceable></option></arg>
86 <arg choice="plain"><option>--repeat</option></arg>
87 <arg choice="plain"><option>--insert</option></arg>
88 <arg choice="plain"><option>--compress</option></arg>
89 <arg choice="plain"><option>--html</option></arg>
90 <arg choice="plain"><option>--xmlout</option></arg>
91 <arg choice="plain"><option>--push</option></arg>
92 <arg choice="plain"><option>--memory</option></arg>
93 <arg choice="plain"><option>--maxmem <replaceable class="option">NBBYTES</replaceable></option></arg>
94 <arg choice="plain"><option>--nowarning</option></arg>
95 <arg choice="plain"><option>--noblanks</option></arg>
96 <arg choice="plain"><option>--nocdata</option></arg>
97 <arg choice="plain"><option>--format</option></arg>
98 <arg choice="plain"><option>--encode <replaceable class="option">ENCODING</replaceable></option></arg>
99 <arg choice="plain"><option>--dropdtd</option></arg>
100 <arg choice="plain"><option>--nsclean</option></arg>
101 <arg choice="plain"><option>--testIO</option></arg>
102 <arg choice="plain"><option>--catalogs</option></arg>
103 <arg choice="plain"><option>--nocatalogs</option></arg>
104 <arg choice="plain"><option>--auto</option></arg>
105 <arg choice="plain"><option>--xinclude</option></arg>
106 <arg choice="plain"><option>--noxincludenode</option></arg>
107 <arg choice="plain"><option>--loaddtd</option></arg>
108 <arg choice="plain"><option>--dtdattr</option></arg>
109 <arg choice="plain"><option>--stream</option></arg>
110 <arg choice="plain"><option>--walker</option></arg>
111 <arg choice="plain"><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></arg>
112 <arg choice="plain"><option>--chkregister</option></arg>
113 <arg choice="plain"><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></arg>
114 <arg choice="plain"><option>--schema <replaceable class="option">SCHEMA</replaceable></option></arg>
115 <arg choice="plain"><option>--c14n</option></arg>
116 </group>
117 <group choice="req">
118 <arg choice="plain" rep="repeat"><replaceable>XML-FILE(S)</replaceable></arg>
119 <arg choice="plain" rep="norepeat">-</arg>
120 </group>
121 </cmdsynopsis>
122 <cmdsynopsis>
123 <command>xmllint</command>
124 <arg choice="plain"><option>--help</option></arg>
125 </cmdsynopsis>
126</refsynopsisdiv>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000127
Daniel Veillard46f97212006-02-20 08:58:51 +0000128<refsect1 id="introduction">
129 <title>DESCRIPTION</title>
130 <para>
131 The &xmllint; program parses one or more XML files, specified on the
132 command line as <replaceable>XML-FILE</replaceable> (or the standard
133 input if the filename provided is <emphasis role="bold">-</emphasis> ).
134 It prints various types of output, depending upon the options selected.
135 It is useful for detecting errors both
136 in <acronym>XML</acronym> code and in the <acronym>XML</acronym> parser
137 itself.
138 </para>
139 <para>&xmllint; is included in <application>libxml2</application>.</para>
140</refsect1>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000141
Daniel Veillard46f97212006-02-20 08:58:51 +0000142<refsect1 id="options">
143 <title>OPTIONS</title>
144 <para>
145 &xmllint; accepts the following options (in alphabetical order):
146 </para>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000147
Daniel Veillard46f97212006-02-20 08:58:51 +0000148 <variablelist>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000149
Daniel Veillard46f97212006-02-20 08:58:51 +0000150 <varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000151 <term><option>--auto</option></term>
152 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000153 <para>Generate a small document for testing purposes.</para>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000154 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000155 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000156
Daniel Veillard46f97212006-02-20 08:58:51 +0000157 <varlistentry>
158 <term><option>--catalogs</option></term>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000159 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000160 <para>
161 Use the catalogs from <envar>SGML_CATALOG_FILES</envar>.
162 Otherwise <filename>/etc/xml/catalog</filename> is used by default.
163 </para>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000164 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000165 </varlistentry>
166
167 <varlistentry>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000168 <term><option>--chkregister</option></term>
169 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000170 <para>
171 Turn on node registration. Useful for developers
172 testing <application>libxml2</application> node tracking code.
173 </para>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000174 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000175 </varlistentry>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000176
Daniel Veillard46f97212006-02-20 08:58:51 +0000177 <varlistentry>
178 <term><option>--compress</option></term>
179 <listitem>
180 <para>
181 Turn on <application>gzip</application> compression of output.
182 </para>
183 </listitem>
184 </varlistentry>
185
186 <varlistentry>
187 <term><option>--copy</option></term>
188 <listitem>
189 <para>Test the internal copy implementation.</para>
190 </listitem>
191 </varlistentry>
192
193 <varlistentry>
194 <term><option>--c14n</option></term>
195 <listitem>
196 <para>
197 Use the W3C XML Canonicalisation (<acronym>C14N</acronym>) to serialize
198 the result of parsing to <filename class="devicefile">stdout</filename>.
199 It keeps comments in the result.
200 </para>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry>
205 <term><option>--dtdvalid <replaceable class="option">URL</replaceable></option></term>
206 <listitem>
207 <para>
208 Use the <acronym>DTD</acronym> specified by
209 an <replaceable>URL</replaceable> for validation.
210 </para>
211 </listitem>
212 </varlistentry>
213
214 <varlistentry>
215 <term><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></term>
216 <listitem>
217 <para>
218 Use the <acronym>DTD</acronym> specified by a Public
219 Identifier <replaceable>FPI</replaceable> for validation, note that this
220 will require a Catalog exporting that Public Identifier to work.
221 </para>
222 </listitem>
223 </varlistentry>
224
225 <varlistentry>
226 <term><option>--debug</option></term>
227 <listitem>
228 <para>
229 Parse a file and output an annotated tree of the
230 in-memory version of the document.
231 </para>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry>
236 <term><option>--debugent</option></term>
237 <listitem>
238 <para>Debug the entities defined in the document.</para>
239 </listitem>
240 </varlistentry>
241
242 <varlistentry>
243 <term><option>--dropdtd</option></term>
244 <listitem>
245 <para>Remove <acronym>DTD</acronym> from output.</para>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry>
250 <term><option>--dtdattr</option></term>
251 <listitem>
252 <para>
253 Fetch external <acronym>DTD</acronym> and populate the tree with
254 inherited attributes.
255 </para>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry>
260 <term><option>--encode <replaceable class="option">ENCODING</replaceable></option></term>
261 <listitem>
262 <para>Output in the given encoding.</para>
263 </listitem>
264 </varlistentry>
265
266 <varlistentry>
267 <term><option>--format</option></term>
268 <listitem>
269 <para>
270 Reformat and reindent the output. The <envar>XMLLINT_INDENT</envar>
271 environment variable controls the indentation (default value is two
272 spaces &quot; &quot;).
273 </para>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry>
278 <term><option>--help</option></term>
279 <listitem>
280 <para>Print out a short usage summary for &xmllint;.</para>
281 </listitem>
282 </varlistentry>
283
284 <varlistentry>
285 <term><option>--html</option></term>
286 <listitem>
287 <para>Use the <acronym>HTML</acronym> parser.</para>
288 </listitem>
289 </varlistentry>
290
291 <varlistentry>
292 <term><option>--htmlout</option></term>
293 <listitem>
294 <para>
295 Output results as an <acronym>HTML</acronym> file. This
296 causes &xmllint; to output the necessary <acronym>HTML</acronym>
297 tags surrounding the result tree output so the results can be
298 displayed/viewed in a browser.
299 </para>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry>
304 <term><option>--insert</option></term>
305 <listitem>
306 <para>Test for valid insertions.</para>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry>
311 <term><option>--loaddtd</option></term>
312 <listitem>
313 <para>Fetch external <acronym>DTD</acronym>.</para>
314 </listitem>
315 </varlistentry>
316
317 <varlistentry>
318 <term><option>--load-trace</option></term>
319 <listitem>
320 <para>
321 Display all the documents loaded during the processing
322 to <filename class="devicefile">stderr</filename>.
323 </para>
324 </listitem>
325 </varlistentry>
326
327 <varlistentry>
328 <term><option>--maxmem <replaceable class="option">NNBYTES</replaceable></option></term>
329 <listitem>
330 <para>
331 Test the parser memory support. <replaceable>NNBYTES</replaceable>
332 is the maximum number of bytes the library is allowed to allocate.
333 This can also be used to make sure batch processing
334 of <acronym>XML</acronym> files will not exhaust the virtual memory
335 of the server running them.
336 </para>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry>
341 <term><option>--memory</option></term>
342 <listitem>
343 <para>Parse from memory.</para>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry>
348 <term><option>--noblanks</option></term>
349 <listitem>
350 <para>Drop ignorable blank spaces.</para>
351 </listitem>
352 </varlistentry>
353
354 <varlistentry>
355 <term><option>--nocatalogs</option></term>
356 <listitem>
357 <para>Do not use any catalogs.</para>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry>
362 <term><option>--nocdata</option></term>
363 <listitem>
364 <para>Substitute CDATA section by equivalent text nodes.</para>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry>
369 <term><option>--noent</option></term>
370 <listitem>
371 <para>
372 Substitute entity values for entity references. By default, &xmllint;
373 leaves entity references in place.
374 </para>
375 </listitem>
376 </varlistentry>
377
378 <varlistentry>
379 <term><option>--nonet</option></term>
380 <listitem>
381 <para>
382 Do not use the Internet to fetch <acronym>DTD</acronym>s or entities.
383 </para>
384 </listitem>
385 </varlistentry>
386
387 <varlistentry>
388 <term><option>--noout</option></term>
389 <listitem>
390 <para>
391 Suppress output. By default, &xmllint; outputs the result tree.
392 </para>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry>
397 <term><option>--nowarning</option></term>
398 <listitem>
399 <para>Do not emit warnings from the parser and/or validator.</para>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry>
404 <term><option>--nowrap</option></term>
405 <listitem>
406 <para>Do not output <acronym>HTML</acronym> doc wrapper.</para>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry>
411 <term><option>--noxincludenode</option></term>
412 <listitem>
413 <para>
414 Do XInclude processing but do not generate XInclude start and end nodes.
415 </para>
416 </listitem>
417 </varlistentry>
418
419 <varlistentry>
420 <term><option>--nsclean</option></term>
421 <listitem>
422 <para>Remove redundant namespace declarations.</para>
423 </listitem>
424 </varlistentry>
425
426 <varlistentry>
427 <term><option>--output <replaceable class="option">FILE</replaceable></option></term>
428 <listitem>
429 <para>
430 Define a file path where &xmllint; will save the result of parsing.
431 Usually the programs build a tree and save it
432 on <filename class="devicefile">stdout</filename>, with this option
433 the result <acronym>XML</acronym> instance will be saved onto a file.
434 </para>
435 </listitem>
436 </varlistentry>
437
438 <varlistentry>
439 <term><option>--path <replaceable class="option">"PATHS"</replaceable></option></term>
440 <listitem>
441 <para>
442 Use the (space- or colon-separated) list of filesystem paths specified
443 by <replaceable>PATHS</replaceable> to load <acronym>DTD</acronym>s or
444 entities. Enclose space-separated lists by quotation marks.
445 </para>
446 </listitem>
447 </varlistentry>
448
449 <varlistentry>
450 <term><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></term>
451 <listitem>
452 <para>
453 Used to exercise the pattern recognition engine, which can be used
454 with the reader interface to the parser. It allows to select some
455 nodes in the document based on an XPath (subset) expression. Used
456 for debugging.
457 </para>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry>
462 <term><option>--postvalid</option></term>
463 <listitem>
464 <para>Validate after parsing is completed.</para>
465 </listitem>
466 </varlistentry>
467
468 <varlistentry>
469 <term><option>--push</option></term>
470 <listitem>
471 <para>Use the push mode of the parser.</para>
472 </listitem>
473 </varlistentry>
474
475 <varlistentry>
476 <term><option>--recover</option></term>
477 <listitem>
478 <para>Output any parsable portions of an invalid document.</para>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry>
483 <term><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></term>
484 <listitem>
485 <para>
486 Use RelaxNG file named <replaceable class="option">SCHEMA</replaceable>
487 for validation.
488 </para>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry>
493 <term><option>--repeat</option></term>
494 <listitem>
495 <para>Repeat 100 times, for timing or profiling.</para>
496 </listitem>
497 </varlistentry>
498
499 <varlistentry>
500 <term><option>--schema <replaceable>SCHEMA</replaceable></option></term>
501 <listitem>
502 <para>
503 Use a W3C XML Schema file named <replaceable>SCHEMA</replaceable>
504 for validation.
505 </para>
506 </listitem>
507 </varlistentry>
508
509 <varlistentry>
510 <term><option>--shell</option></term>
511 <listitem>
512 <para>
513 Run a navigating shell. Details on available commands in shell mode
514 are below (see section <emphasis role="bold">SHELL COMMANDS</emphasis>).
515 </para>
516 </listitem>
517 </varlistentry>
518
519 <varlistentry>
520 <term><option>--stream</option></term>
521 <listitem>
522 <para>
523 Use streaming API - useful when used in combination
524 with <option>--relaxng</option> or <option>--valid</option> options
525 for validation of files that are too large to be held in memory.
526 </para>
527 </listitem>
528 </varlistentry>
529
530 <varlistentry>
531 <term><option>--testIO</option></term>
532 <listitem>
533 <para>Test user input/output support.</para>
534 </listitem>
535 </varlistentry>
536
537 <varlistentry>
538 <term><option>--timing</option></term>
539 <listitem>
540 <para>
541 Output information about the time it takes &xmllint; to perform the
542 various steps.
543 </para>
544 </listitem>
545 </varlistentry>
546
547 <varlistentry>
548 <term><option>--valid</option></term>
549 <listitem>
550 <para>
551 Determine if the document is a valid instance of the included
552 Document Type Definition (<acronym>DTD</acronym>).
553 A <acronym>DTD</acronym> to be validated against also can be
554 specified at the command line using the <option>--dtdvalid</option>
555 option. By default, &xmllint; also checks to determine if the
556 document is well-formed.
557 </para>
558 </listitem>
559 </varlistentry>
560
561 <varlistentry>
562 <term><option>--version</option></term>
563 <listitem>
564 <para>
565 Display the version of <application>libxml2</application> used.
566 </para>
567 </listitem>
568 </varlistentry>
569
570 <varlistentry>
571 <term><option>--walker</option></term>
572 <listitem>
573 <para>
574 Test the walker module, which is a reader interface but for a
575 document tree, instead of using the reader <acronym>API</acronym> on
576 an unparsed document it works on a existing in-memory tree. Used in
577 debugging.
578 </para>
579 </listitem>
580 </varlistentry>
581
582 <varlistentry>
583 <term><option>--xinclude</option></term>
584 <listitem>
585 <para>Do XInclude processing.</para>
586 </listitem>
587 </varlistentry>
588
589 <varlistentry>
590 <term><option>--xmlout</option></term>
591 <listitem>
592 <para>
593 Used in conjunction with <option>--html</option>. Usually
594 when <acronym>HTML</acronym> is parsed the document is saved with
595 the <acronym>HTML</acronym> serializer, but with this option the
596 resulting document is saved with the <acronym>XML</acronym>
597 serializer. This is primarily used to
598 generate <acronym>XHTML</acronym>
599 from <acronym>HTML</acronym> input.
600 </para>
601 </listitem>
602 </varlistentry>
603
604 </variablelist>
605</refsect1>
606
607<refsect1 id="shell">
608 <title>SHELL COMMANDS</title>
609 <para>
610 &xmllint; offers an interactive shell mode invoked with
611 the <option>--shell</option> command. Available commands in shell mode
612 include (in alphabetical order):
613 </para>
614 <variablelist>
615
616 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000617 <term><command>base</command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000618 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000619 <para>Display <acronym>XML</acronym> base of the node.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000620 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000621 </varlistentry>
622
623 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000624 <term><command>bye</command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000625 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000626 <para>Leave the shell.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000627 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000628 </varlistentry>
629
630 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000631 <term><command>cat <replaceable>NODE</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000632 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000633 <para>Display the given node or the current one.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000634 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000635 </varlistentry>
636
637 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000638 <term><command>cd <replaceable>PATH</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000639 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000640 <para>
641 Change the current node to the given path (if unique) or root if no
642 argument is given.
643 </para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000644 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000645 </varlistentry>
646
647 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000648 <term><command>dir <replaceable>PATH</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000649 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000650 <para>
651 Dumps information about the node (namespace, attributes, content).
652 </para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000653 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000654 </varlistentry>
655
656 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000657 <term><command>du <replaceable>PATH</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000658 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000659 <para>
660 Show the structure of the subtree under the given path or the current node.
661 </para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000662 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000663 </varlistentry>
664
665 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000666 <term><command>exit</command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000667 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000668 <para>Leave the shell.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000669 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000670 </varlistentry>
671
672 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000673 <term><command>help</command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000674 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000675 <para>Show this help.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000676 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000677 </varlistentry>
678
679 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000680 <term><command>free</command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000681 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000682 <para>Display memory usage.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000683 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000684 </varlistentry>
685
686 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000687 <term><command>load <replaceable>FILENAME</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000688 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000689 <para>Load a new document with the given filename.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000690 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000691 </varlistentry>
692
693 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000694 <term><command>ls <replaceable>PATH</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000695 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000696 <para>List contents of the given path or the current directory.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000697 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000698 </varlistentry>
699
700 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000701 <term><command>pwd</command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000702 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000703 <para>Display the path to the current node.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000704 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000705 </varlistentry>
706
707 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000708 <term><command>quit</command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000709 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000710 <para>Leave the shell.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000711 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000712 </varlistentry>
713
714 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000715 <term><command>save <replaceable>FILENAME</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000716 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000717 <para>
718 Save the current document to the given filename or to the original name.
719 </para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000720 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000721 </varlistentry>
722
723 <varlistentry>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000724 <term><option>validate</option></term>
725 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000726 <para>Check the document for errors.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000727 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000728 </varlistentry>
729
730 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000731 <term><command>write <replaceable>FILENAME</replaceable></command></term>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000732 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000733 <para>Write the current node to the given filename.</para>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000734 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000735 </varlistentry>
736
737 </variablelist>
738</refsect1>
739
740<refsect1>
741 <title>ENVIRONMENT</title>
742 <variablelist>
743
744 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000745 <term><envar>SGML_CATALOG_FILES</envar></term>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000746 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000747 <para>...</para>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000748 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000749 </varlistentry>
750
751 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000752 <term><envar>XML_CATALOG_FILES</envar></term>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000753 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000754 <para>
755 Catalog behavior can be changed by redirecting queries to the user's
756 own set of catalogs. This can be done by setting
757 the <envar>XML_CATALOG_FILES</envar> environment variable to a list
758 of catalogs. An empty one should deactivate loading the
759 default <filename>/etc/xml/catalog</filename> default catalog.
760 </para>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000761 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000762 </varlistentry>
763
764 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000765 <term><envar>XML_DEBUG_CATALOG</envar></term>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000766 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000767 <para>
768 Setting the environment variable <envar>XML_DEBUG_CATALOG</envar>
769 using the <command>export</command> command outputs debugging information
770 related to catalog operations.
771 </para>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000772 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000773 </varlistentry>
774
775 <varlistentry>
Daniel Veillard6464d6a2006-02-19 21:35:39 +0000776 <term><envar>XMLLINT_INDENT</envar></term>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000777 <listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000778 <para>...</para>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000779 </listitem>
Daniel Veillard46f97212006-02-20 08:58:51 +0000780 </varlistentry>
781
782 </variablelist>
783</refsect1>
784
785<refsect1>
786 <title>DIAGNOSTICS</title>
787 <para>
788 On the completion of execution, &xmllint; returns the following error codes:
789 </para>
790 <variablelist>
791
792 <varlistentry>
793 <term><errorcode>0</errorcode></term>
794 <listitem>
795 <para>No error</para>
796 </listitem>
797 </varlistentry>
798
799 <varlistentry>
800 <term><errorcode>1</errorcode></term>
801 <listitem>
802 <para>Unclassified</para>
803 </listitem>
804 </varlistentry>
805
806 <varlistentry>
807 <term><errorcode>2</errorcode></term>
808 <listitem>
809 <para>Error in <acronym>DTD</acronym></para>
810 </listitem>
811 </varlistentry>
812
813 <varlistentry>
814 <term><errorcode>3</errorcode></term>
815 <listitem>
816 <para>Validation error</para>
817 </listitem>
818 </varlistentry>
819
820 <varlistentry>
821 <term><errorcode>4</errorcode></term>
822 <listitem>
823 <para>Validation error</para>
824 </listitem>
825 </varlistentry>
826
827 <varlistentry>
828 <term><errorcode>5</errorcode></term>
829 <listitem>
830 <para>Error in schema compilation</para>
831 </listitem>
832 </varlistentry>
833
834 <varlistentry>
835 <term><errorcode>6</errorcode></term>
836 <listitem>
837 <para>Error writing output</para>
838 </listitem>
839 </varlistentry>
840
841 <varlistentry>
842 <term><errorcode>7</errorcode></term>
843 <listitem>
844 <para>
845 Error in pattern (generated when <option>--pattern</option> option is used)
846 </para>
847 </listitem>
848 </varlistentry>
849
850 <varlistentry>
851 <term><errorcode>8</errorcode></term>
852 <listitem>
853 <para>
854 Error in Reader registration (generated
855 when <option>--chkregister</option> option is used)
856 </para>
857 </listitem>
858 </varlistentry>
859
860 <varlistentry>
861 <term><errorcode>9</errorcode></term>
862 <listitem>
863 <para>Out of memory error</para>
864 </listitem>
865 </varlistentry>
866
867 </variablelist>
868</refsect1>
869
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000870</refentry>