blob: dfc5d4b989998b8e0682f4ae5b9ab415a3f5ec86 [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" [
6]>
7<refentry>
8 <refentryinfo>
9 <title>xmllint Manual</title>
10 <copyright>
11 <year>2001</year>
12 </copyright>
MST 2004 John Flecke42ae6f2004-02-27 03:26:30 +000013 <copyright>
14 <year>2004</year>
15 </copyright>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000016 <author>
17 <firstname>John</firstname>
18 <surname>Fleck</surname>
19 </author>
20 <address><email>jfleck@inkstain.net</email></address>
21 <author>
22 <firstname>Ziying</firstname>
23 <surname>Sherwin</surname>
24 </author>
25 <address><email>sherwin@nlm.nih.gov</email></address>
MST 2001 John Fleck42304042001-11-18 00:18:06 +000026 <author>
27 <firstname>Heiko</firstname>
28 <surname>Rupp</surname>
29 </author>
30 <address><email>hwr@pilhuhn.de</email></address>
MST 2001 John Fleck3fc555e2001-12-11 04:41:24 +000031
John Fleck3cbaa6d2004-08-15 00:47:45 +000032 <releaseinfo>This is release 0.5 of the xmllint Manual.</releaseinfo>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000033 </refentryinfo>
34
35 <refmeta>
36 <refentrytitle>xmllint</refentrytitle>
37 <manvolnum>1</manvolnum>
38 </refmeta>
39
40 <refnamediv>
41 <refname>xmllint</refname>
42 <refpurpose>command line <acronym>XML</acronym> tool</refpurpose>
43 </refnamediv>
44
45 <refsynopsisdiv>
46 <cmdsynopsis>
47 <command>xmllint</command>
48 <group>
49 <arg>--version</arg>
50 <arg>--debug</arg>
51 <arg>--shell</arg>
52 <arg>--debugent</arg>
53 <arg>--copy</arg>
54 <arg>--recover</arg>
55 <arg>--noent</arg>
56 <arg>--noout</arg>
John Fleck3cbaa6d2004-08-15 00:47:45 +000057 <arg>--nonet</arg>
Daniel Veillard0bff36d2004-08-31 09:37:03 +000058 <arg>--path <replaceable>paths</replaceable></arg>
59 <arg>--load-trace</arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000060 <arg>--htmlout</arg>
61 <arg>--nowrap</arg>
62 <arg>--valid</arg>
63 <arg>--postvalid</arg>
64 <arg>--dtdvalid <replaceable>URL</replaceable></arg>
Daniel Veillard66f68e72003-08-18 16:39:51 +000065 <arg>--dtdvalidfpi <replaceable>FPI</replaceable></arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000066 <arg>--timing</arg>
John Fleck3cbaa6d2004-08-15 00:47:45 +000067 <arg>--output <replaceable>file</replaceable></arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000068 <arg>--repeat</arg>
69 <arg>--insert</arg>
70 <arg>--compress</arg>
71 <arg>--html</arg>
John Fleck3cbaa6d2004-08-15 00:47:45 +000072 <arg>--xmlout</arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000073 <arg>--push</arg>
74 <arg>--memory</arg>
John Fleck3cbaa6d2004-08-15 00:47:45 +000075 <arg>--maxmem <replaceable>nbbytes</replaceable></arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000076 <arg>--nowarning</arg>
77 <arg>--noblanks</arg>
John Fleck3cbaa6d2004-08-15 00:47:45 +000078 <arg>--nocdata</arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000079 <arg>--format</arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000080 <arg>--encode <replaceable>encoding</replaceable></arg>
John Fleck3cbaa6d2004-08-15 00:47:45 +000081 <arg>--dropdtd</arg>
82 <arg>--nsclean</arg>
83 <arg>--testIO</arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000084 <arg>--catalogs</arg>
85 <arg>--nocatalogs</arg>
86 <arg>--auto</arg>
87 <arg>--xinclude</arg>
Daniel Veillardc14c3892004-08-16 12:34:50 +000088 <arg>--noxincludenode</arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000089 <arg>--loaddtd</arg>
90 <arg>--dtdattr</arg>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +000091 <arg>--stream</arg>
John Fleck3cbaa6d2004-08-15 00:47:45 +000092 <arg>--walker</arg>
93 <arg>--pattern <replaceable>patternvalue</replaceable></arg>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +000094 <arg>--chkregister</arg>
MST 2003 John Fleckda271742003-03-25 14:05:17 +000095 <arg>--relaxng</arg>
Daniel Veillarde8b09e42003-05-13 22:14:13 +000096 <arg>--schema</arg>
MDT 2004 John Fleck774a3bd2004-08-15 00:54:21 +000097 <arg>--c14n</arg>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000098 </group>
99 <arg><option><replaceable>xmlfile</replaceable></option></arg>
100 </cmdsynopsis>
101 </refsynopsisdiv>
102
103 <refsect1 id="introduction">
104 <title>Introduction</title>
105 <para>
106 The xmllint program parses one or more XML files, specified on the
Daniel Veillarde44aafb2004-10-29 12:18:43 +0000107 command line as <replaceable>xmlfile</replaceable> (or the standard
108 input if the filename provided is - ). It prints various
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000109 types of output, depending upon the options selected. It is useful for
110 detecting errors both in <acronym>XML</acronym> code and in the
111 <acronym>XML</acronym> parser itself.
112 </para>
113
114 <para>
115 It is included in <application>libxml2</application>.
116 </para>
117 </refsect1>
118 <refsect1 id="options">
119 <title>Options</title>
120 <variablelist>
121 <varlistentry>
122 <term><option>--version</option></term>
123 <listitem>
124 <simpara>
125 Display the version of
126 <application>libxml2</application> used.
127 </simpara>
128 </listitem>
129 </varlistentry>
130
131 <varlistentry>
132 <term><option>--debug</option></term>
133 <listitem>
134 <simpara>
135 Parse a file and output an annotated tree of the
136 in-memory version of the document.
137 </simpara>
138 </listitem>
139 </varlistentry>
140
141 <varlistentry>
142 <term><option>--shell</option></term>
143 <listitem>
144 <simpara>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000145 Run a navigating shell. Details on available commands in shell mode
146 are below.
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000147 </simpara>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry>
152 <term><option>--debugent</option></term>
153 <listitem>
154 <simpara>
155 Debug the entities defined in the document.
156 </simpara>
157 </listitem>
158 </varlistentry>
159
160 <varlistentry>
161 <term><option>--copy</option> </term>
162 <listitem>
163 <simpara>
164 Test the internal copy implementation.
165 </simpara>
166 </listitem>
167 </varlistentry>
168
169
170 <varlistentry>
171 <term><option>--recover</option></term>
172 <listitem>
173 <simpara>
174 Output any parsable portions of an invalid
175 document.
176 </simpara>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry>
181 <term><option>--noent</option></term>
182 <listitem>
183 <simpara>
184 Substitute entity values for entity
185 references. By default, <application>xmllint</application> leaves entity
186 references in place.
187 </simpara>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry>
Daniel Veillarddca8cc72003-09-26 13:53:14 +0000192 <term><option>--nocdata</option></term>
193 <listitem>
194 <simpara>
195 Substitute CDATA section by equivalent text nodes.
196 </simpara>
197 </listitem>
198 </varlistentry>
199
200 <varlistentry>
201 <term><option>--nsclean</option></term>
202 <listitem>
203 <simpara>
204 Remove redundant namespace declarations.
205 </simpara>
206 </listitem>
207 </varlistentry>
208
209 <varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000210 <term><option>--noout</option></term>
211 <listitem>
212 <simpara>
213 Suppress output. By default,
214 <application>xmllint</application> outputs the result tree.
215 </simpara>
216 </listitem>
217 </varlistentry>
218
Daniel Veillard0bff36d2004-08-31 09:37:03 +0000219 <varlistentry>
220 <term><option>--nonet</option></term>
221 <listitem>
222 <simpara>
223 Do not use the Internet to fetch DTD's or entities.
224 </simpara>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry>
229 <term><option>--nonet</option></term>
230 <listitem>
231 <simpara>
232 Do not use the Internet to fetch DTD's or entities.
233 </simpara>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry>
238 <term> <option>--path</option> <replaceable>paths</replaceable></term>
239 <listitem>
240 <simpara>
241 Use the list (separated by space or column) of filesystem path
242 specified by <replaceable>paths</replaceable> to load
243 <acronym>DTDs</acronym> or entities .
244 </simpara>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry>
249 <term><option>--load-trace</option></term>
250 <listitem>
251 <simpara>
252 Display to stderr all the documents loaded during the processing.
253 </simpara>
254 </listitem>
255 </varlistentry>
256
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000257 <varlistentry>
258 <term><option>--htmlout</option></term>
259 <listitem>
260 <simpara>
261 Output results as an <acronym>HTML</acronym>
262 file. This causes <application>xmllint</application> to output
263 the necessary <acronym>HTML</acronym> tags surrounding the result tree
264 output so the results can be displayed in a browser.
265 </simpara>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry>
270 <term><option>--nowrap </option></term>
271 <listitem>
272 <simpara>
273 Do not output HTML doc wrapper.
274 </simpara>
275 </listitem>
276 </varlistentry>
277
278<varlistentry>
279 <term><option>--valid </option></term>
280 <listitem>
281 <simpara>
282 Determine if the document is a valid instance
283 of the included Document Type Definition (<acronym>DTD</acronym>). A
284 <acronym>DTD</acronym> to be validated against also can be specified at
285 the command line using the <option>--dtdvalid</option> option. By default,
286 <application>xmllint</application> also checks to determine if the
287 document is well-formed.
288 </simpara>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry>
293 <term><option>--postvalid</option></term>
294 <listitem>
295 <simpara>
296 Validate after parsing is completed.
297 </simpara>
298 </listitem>
299 </varlistentry>
300
301 <varlistentry>
302 <term> <option>--dtdvalid</option> <replaceable>URL</replaceable></term>
303 <listitem>
304 <simpara>
305 Use the
306 <acronym>DTD</acronym> specified by <replaceable>URL</replaceable> for
307 validation.
308 </simpara>
309 </listitem>
310 </varlistentry>
311
Daniel Veillard66f68e72003-08-18 16:39:51 +0000312 <varlistentry>
313 <term> <option>--dtdvalidfpi</option> <replaceable>FPI</replaceable></term>
314 <listitem>
315 <simpara>
316 Use the
317 <acronym>DTD</acronym> specified by the Public Identifier
318 <replaceable>FPI</replaceable> for validation, note that this
319 will require a Catalog exporting that Public Identifier to work.
320 </simpara>
321 </listitem>
322 </varlistentry>
323
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000324 <varlistentry>
325 <term><option>--timing</option></term>
326 <listitem>
327 <simpara>
328 Output information about the time it takes
329 <application>xmllint</application> to perform the various steps.
330 </simpara>
331 </listitem>
332 </varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000333 <varlistentry>
334 <term><option>--output</option> <replaceable>file</replaceable></term>
335 <listitem>
336 <simpara>Define a file path where xmllint will save the result of
337 parsing. Usually the programs build a tree and save it on stdout, with
338 this option the result XML instance will be saved onto a file.</simpara>
339 </listitem>
340 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000341 <varlistentry>
342 <term><option>--repeat</option></term>
343 <listitem>
344 <simpara>
345 Repeat 100 times, for timing or profiling.
346 </simpara>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry>
351 <term><option>--insert</option></term>
352 <listitem>
353 <simpara>
354 Test for valid insertions.
355 </simpara>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry>
360 <term><option>--compress</option></term>
361 <listitem>
362 <simpara>
363 Turn on gzip compression of output.
364 </simpara>
365 </listitem>
366 </varlistentry>
367
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000368 <varlistentry>
369 <term><option>--html</option></term>
370 <listitem>
371 <simpara>
372 Use the <acronym>HTML</acronym> parser.
373 </simpara>
374 </listitem>
375 </varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000376 <varlistentry>
377 <term><option>--xmlout</option></term>
378 <listitem>
Daniel Veillardf10ae122005-07-10 19:03:16 +0000379 <simpara>Used in conjunction with <option>--html</option>. Usually
John Fleck3cbaa6d2004-08-15 00:47:45 +0000380 when HTML is parsed the document is saved with the HTML serializer, but with
381 this option the resulting document is saved with the XML serializer. This is
382 primarily used to generate XHTML from HTML input.</simpara>
383 </listitem>
384 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000385 <varlistentry>
386 <term><option>--push</option></term>
387 <listitem>
388 <simpara>
389 Use the push mode of the parser.
390 </simpara>
391 </listitem>
392 </varlistentry>
393
394
395 <varlistentry>
396 <term><option>--memory</option></term>
397 <listitem>
398 <simpara>
399 Parse from memory.
400 </simpara>
401 </listitem>
402 </varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000403 <varlistentry>
404 <term><option>--maxmem</option> <replaceable>nnbytes</replaceable></term>
405 <listitem>
406 <simpara>Test the parser memory
407 support. <replaceable>nnbytes</replaceable> is the maximum number of bytes the
408 library is allowed to allocate. This can also be used to make sure batch
409 processing of XML files will not exhaust the virtual memory of the server
410 running them.</simpara>
411 </listitem>
412 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000413 <varlistentry>
414 <term><option>--nowarning</option></term>
415 <listitem>
416 <simpara>
417 Do not emit warnings from the parser and/or validator.
418 </simpara>
419 </listitem>
420 </varlistentry>
421
422 <varlistentry>
423 <term><option>--noblanks</option></term>
424 <listitem>
425 <simpara>
426 Drop ignorable blank spaces.
427 </simpara>
428 </listitem>
429 </varlistentry>
430
431 <varlistentry>
432 <term><option>--format</option></term>
433 <listitem>
434 <simpara>
Aleksey Sanin693c9bc2003-03-09 22:36:52 +0000435 Reformat and reindent the output. The $XMLLINT_INDENT
436 environment variable controls the indentation (default
Daniel Veillarddc07e182003-04-25 10:39:38 +0000437 value is two spaces &quot; &quot;).
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000438 </simpara>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry>
443 <term><option>--testIO</option></term>
444 <listitem>
445 <simpara>
446 Test user input/output support.
447 </simpara>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry>
452 <term><option>--encode</option> <replaceable>encoding</replaceable></term>
453 <listitem>
454 <simpara>
455 Output in the given encoding.
456 </simpara>
457 </listitem>
458 </varlistentry>
459
460 <varlistentry>
461 <term><option>--catalogs</option></term>
462 <listitem>
463 <simpara>
464 Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog
465 is used by default.
466 </simpara>
467 </listitem>
468 </varlistentry>
469
470 <varlistentry>
471 <term><option>--nocatalogs</option></term>
472 <listitem>
473 <simpara>
474 Do not use any catalogs.
475 </simpara>
476 </listitem>
477 </varlistentry>
478
479 <varlistentry>
480 <term><option>--auto</option></term>
481 <listitem>
482 <simpara>
483 Generate a small document for testing purposes.
484 </simpara>
485 </listitem>
486 </varlistentry>
487
488 <varlistentry>
489 <term><option>--xinclude</option></term>
490 <listitem>
491 <simpara>
492 Do XInclude processing.
493 </simpara>
494 </listitem>
495 </varlistentry>
496 <varlistentry>
Daniel Veillardc14c3892004-08-16 12:34:50 +0000497 <term><option>--noxincludenode</option></term>
498 <listitem>
499 <simpara>
500 Do XInclude processing but do not generate XInclude start and end
501 nodes.
502 </simpara>
503 </listitem>
504 </varlistentry>
505 <varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000506 <term><option>--loaddtd</option></term>
507 <listitem>
508 <simpara>
509 Fetch external DTD.
510 </simpara>
511 </listitem>
512 </varlistentry>
513
514 <varlistentry>
515 <term><option>--dtdattr</option></term>
516 <listitem>
517 <simpara>
518 Fetch external DTD and populate the tree with inherited attributes.
519 </simpara>
520 </listitem>
521 </varlistentry>
MST 2001 John Fleck2323ac22001-12-14 04:24:50 +0000522 <varlistentry>
523 <term><option>--dropdtd</option></term>
524 <listitem>
525 <simpara>
526 Remove <acronym>DTD</acronym> from output.
527 </simpara>
528 </listitem>
529 </varlistentry>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000530 <varlistentry>
531 <term><option>--stream</option></term>
532 <listitem>
MDT 2003 John Fleck83c8a5c2003-04-20 16:45:07 +0000533 <simpara>Use streaming API - useful when used in combination with
534 --relaxng or --valid options for validation of files that are
535 too large to be held in memory.</simpara>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000536 </listitem>
537 </varlistentry>
538 <varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000539 <term><option>--walker</option></term>
540 <listitem>
541 <simpara>Test the walker module, which is a reader interface but for a
542 document tree, instead of using the reader API on an unparsed document it
543 works on a existing in-memory tree. Used in debugging.</simpara>
544 </listitem>
545 </varlistentry>
546 <varlistentry>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000547 <term><option>--chkregister</option></term>
548 <listitem>
Daniel Veillardda3b29a2004-08-14 11:15:13 +0000549 <simpara>Turn on node registration. Useful for developers testing
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000550 libxml2 node tracking code.</simpara>
551 </listitem>
552 </varlistentry>
MST 2003 John Fleckda271742003-03-25 14:05:17 +0000553 <varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000554 <term><option>--pattern</option> <replaceable>patternvalue</replaceable></term>
555 <listitem>
556 <simpara>Used to exercise the pattern recognition engine, which can be
557 used with the reader interface to the parser. It allows to select some
558 nodes in the document based on an XPath (subset) expression. Used for
559 debugging.</simpara>
560 </listitem>
561 </varlistentry>
562 <varlistentry>
MST 2003 John Fleckda271742003-03-25 14:05:17 +0000563 <term><option>--relaxng</option> <replaceable>schema</replaceable></term>
564 <listitem>
565 <simpara>Use RelaxNG file named <replaceable>schema</replaceable> for
566 validation.</simpara>
567 </listitem>
568 </varlistentry>
Daniel Veillarde8b09e42003-05-13 22:14:13 +0000569 <varlistentry>
570 <term><option>--schema</option> <replaceable>schema</replaceable></term>
571 <listitem>
572 <simpara>Use a W3C XML Schema file named <replaceable>schema</replaceable> for validation.</simpara>
573 </listitem>
574 </varlistentry>
575 <varlistentry>
576 <term>
Daniel Veillard29b17482004-08-16 00:39:03 +0000577 <option>--c14n</option></term>
Daniel Veillarde8b09e42003-05-13 22:14:13 +0000578 <listitem>
Daniel Veillard29b17482004-08-16 00:39:03 +0000579 <simpara>Use the W3C XML Canonicalisation (C14N) to
MDT 2004 John Fleckb1b3a772004-08-19 13:45:47 +0000580serialize the result of parsing to stdout. It keeps comments in
581the result.</simpara>
Daniel Veillarde8b09e42003-05-13 22:14:13 +0000582 </listitem>
583 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000584 </variablelist>
585 </refsect1>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000586
587 <refsect1 id="shell">
588 <title>Shell</title>
589 <para>
590 <application>xmllint</application> offers an interactive shell mode
591 invoked with the <option>--shell</option> command. Available commands in
592 shell mode include:
593 </para>
594 <variablelist>
595 <varlistentry>
596 <term><option>base</option></term>
597 <listitem>
598 <simpara>
599 display XML base of the node
600 </simpara>
601 </listitem>
602 </varlistentry>
603 <varlistentry>
604 <term><option>bye</option></term>
605 <listitem>
606 <simpara>
607 leave shell
608 </simpara>
609 </listitem>
610 </varlistentry>
611 <varlistentry>
612 <term><option>cat <replaceable>node</replaceable></option></term>
613 <listitem>
614 <simpara>
615 Display node if given or current node.
616 </simpara>
617 </listitem>
618 </varlistentry>
619 <varlistentry>
620 <term><option>cd <replaceable>path</replaceable></option></term>
621 <listitem>
622 <simpara>
623 Change the current node to <replaceable>path</replaceable> (if given
624 and unique) or root if no argument given.
625 </simpara>
626 </listitem>
627 </varlistentry>
628 <varlistentry>
629 <term><option>dir <replaceable>path</replaceable></option></term>
630 <listitem>
631 <simpara>
632 Dumps information about the node (namespace, attributes, content).
633 </simpara>
634 </listitem>
635 </varlistentry>
636 <varlistentry>
637 <term><option>du <replaceable>path</replaceable></option></term>
638 <listitem>
639 <simpara>
640 Show the structure of the subtree under path or the current node.
641 </simpara>
642 </listitem>
643 </varlistentry>
644 <varlistentry>
645 <term><option>exit</option></term>
646 <listitem>
647 <simpara>
648 Leave the shell.
649 </simpara>
650 </listitem>
651 </varlistentry>
652 <varlistentry>
653 <term><option>help</option></term>
654 <listitem>
655 <simpara>
656 Show this help.
657 </simpara>
658 </listitem>
659 </varlistentry>
660 <varlistentry>
661 <term><option>free</option></term>
662 <listitem>
663 <simpara>
664 Display memory usage.
665 </simpara>
666 </listitem>
667 </varlistentry>
668 <varlistentry>
669 <term><option>load <replaceable>name</replaceable></option></term>
670 <listitem>
671 <simpara>
672 Load a new document with the given name.
673 </simpara>
674 </listitem>
675 </varlistentry>
676 <varlistentry>
677 <term><option>ls <replaceable>path</replaceable></option></term>
678 <listitem>
679 <simpara>
680 List contents of <replaceable>path</replaceable> (if given) or the
681 current directory.
682 </simpara>
683 </listitem>
684 </varlistentry>
685 <varlistentry>
686 <term><option>pwd</option></term>
687 <listitem>
688 <simpara>
689 Display the path to the current node.
690 </simpara>
691 </listitem>
692 </varlistentry>
693 <varlistentry>
694 <term><option>quit</option></term>
695 <listitem>
696 <simpara>
697 Leave the shell.
698 </simpara>
699 </listitem>
700 </varlistentry>
701 <varlistentry>
702 <term><option>save <replaceable>name</replaceable></option></term>
703 <listitem>
704 <simpara>
705 Saves the current document to <replaceable>name</replaceable> if
706 given or to the original name.
707 </simpara>
708 </listitem>
709 </varlistentry>
710 <varlistentry>
711 <term><option>validate</option></term>
712 <listitem>
713 <simpara>
714 Check the document for error.
715 </simpara>
716 </listitem>
717 </varlistentry>
718 <varlistentry>
719 <term><option>write <replaceable>name</replaceable></option></term>
720 <listitem>
721 <simpara>
722 Write the current node to the given filename.
723 </simpara>
724 </listitem>
725 </varlistentry>
MST 2001 John Fleck2323ac22001-12-14 04:24:50 +0000726
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000727 </variablelist>
728 </refsect1>
MST 2004 John Flecke42ae6f2004-02-27 03:26:30 +0000729<refsect1>
730 <title>Catalogs</title>
731 <para>Catalog behavior can be changed by redirecting
732 queries to the user's own set of catalogs. This can be done by setting the
733 <varname>XML_CATALOG_FILES</varname> environment variable to a list of
734 catalogs. An empty one should deactivate loading the default
735 <filename>/etc/xml/catalog</filename> default catalog.</para>
736 </refsect1>
MST 2002 John Fleck6647aed2002-12-26 02:23:24 +0000737 <refsect1>
738 <title>Debugging Catalogs</title>
739 <para>Setting the environment variable <varname>XML_DEBUG_CATALOG</varname>
740 using the command <command>&quot;export XML_DEBUG_CATALOG=&quot;</command>
741 outputs debugging information related to catalog operations.</para>
742 </refsect1>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000743 <refsect1>
744 <title>Error Return Codes</title>
745 <para>On the completion of execution, <application>Xmllint</application>
746 returns the following error codes:</para>
747 <variablelist>
748 <varlistentry>
749 <term>0</term>
750 <listitem>
751 <simpara>No error</simpara>
752 </listitem>
753 </varlistentry>
754 <varlistentry>
755 <term>1</term>
756 <listitem>
757 <simpara>Unclassified</simpara>
758 </listitem>
759 </varlistentry>
760 <varlistentry>
761 <term>2</term>
762 <listitem>
763 <simpara>Error in DTD</simpara>
764 </listitem>
765 </varlistentry>
766 <varlistentry>
767 <term>3</term>
768 <listitem>
769 <simpara>Validation error</simpara>
770 </listitem>
771 </varlistentry>
772 <varlistentry>
773 <term>4</term>
774 <listitem>
775 <simpara>Validation error</simpara>
776 </listitem>
777 </varlistentry>
778 <varlistentry>
779 <term>5</term>
780 <listitem>
781 <simpara>Error in schema compilation</simpara>
782 </listitem>
783 </varlistentry>
784 <varlistentry>
785 <term>6</term>
786 <listitem>
787 <simpara>Error writing output</simpara>
788 </listitem>
789 </varlistentry>
790 <varlistentry>
791 <term>7</term>
792 <listitem>
793 <simpara>Error in pattern (generated when
794 <optional>--pattern</optional> option is used)</simpara>
795 </listitem>
796 </varlistentry>
797 <varlistentry>
798 <term>8</term>
799 <listitem>
800 <simpara>Error in Reader registration (generated when
801 <optional>--chkregister</optional> option is used)</simpara>
802 </listitem>
803 </varlistentry>
804 <varlistentry>
805 <term>9</term>
806 <listitem>
807 <simpara>Out of memory error</simpara>
808 </listitem>
809 </varlistentry>
810 </variablelist>
811 </refsect1>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000812</refentry>