blob: 904f43ff02abefcf8c5365519efea3362ce7c20f [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>
Daniel Veillard0bff36d2004-08-31 09:37:03 +0000229 <term> <option>--path</option> <replaceable>paths</replaceable></term>
230 <listitem>
231 <simpara>
232 Use the list (separated by space or column) of filesystem path
233 specified by <replaceable>paths</replaceable> to load
234 <acronym>DTDs</acronym> or entities .
235 </simpara>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry>
240 <term><option>--load-trace</option></term>
241 <listitem>
242 <simpara>
243 Display to stderr all the documents loaded during the processing.
244 </simpara>
245 </listitem>
246 </varlistentry>
247
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000248 <varlistentry>
249 <term><option>--htmlout</option></term>
250 <listitem>
251 <simpara>
252 Output results as an <acronym>HTML</acronym>
253 file. This causes <application>xmllint</application> to output
254 the necessary <acronym>HTML</acronym> tags surrounding the result tree
255 output so the results can be displayed in a browser.
256 </simpara>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry>
261 <term><option>--nowrap </option></term>
262 <listitem>
263 <simpara>
264 Do not output HTML doc wrapper.
265 </simpara>
266 </listitem>
267 </varlistentry>
268
269<varlistentry>
270 <term><option>--valid </option></term>
271 <listitem>
272 <simpara>
273 Determine if the document is a valid instance
274 of the included Document Type Definition (<acronym>DTD</acronym>). A
275 <acronym>DTD</acronym> to be validated against also can be specified at
276 the command line using the <option>--dtdvalid</option> option. By default,
277 <application>xmllint</application> also checks to determine if the
278 document is well-formed.
279 </simpara>
280 </listitem>
281 </varlistentry>
282
283 <varlistentry>
284 <term><option>--postvalid</option></term>
285 <listitem>
286 <simpara>
287 Validate after parsing is completed.
288 </simpara>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry>
293 <term> <option>--dtdvalid</option> <replaceable>URL</replaceable></term>
294 <listitem>
295 <simpara>
296 Use the
297 <acronym>DTD</acronym> specified by <replaceable>URL</replaceable> for
298 validation.
299 </simpara>
300 </listitem>
301 </varlistentry>
302
Daniel Veillard66f68e72003-08-18 16:39:51 +0000303 <varlistentry>
304 <term> <option>--dtdvalidfpi</option> <replaceable>FPI</replaceable></term>
305 <listitem>
306 <simpara>
307 Use the
308 <acronym>DTD</acronym> specified by the Public Identifier
309 <replaceable>FPI</replaceable> for validation, note that this
310 will require a Catalog exporting that Public Identifier to work.
311 </simpara>
312 </listitem>
313 </varlistentry>
314
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000315 <varlistentry>
316 <term><option>--timing</option></term>
317 <listitem>
318 <simpara>
319 Output information about the time it takes
320 <application>xmllint</application> to perform the various steps.
321 </simpara>
322 </listitem>
323 </varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000324 <varlistentry>
325 <term><option>--output</option> <replaceable>file</replaceable></term>
326 <listitem>
327 <simpara>Define a file path where xmllint will save the result of
328 parsing. Usually the programs build a tree and save it on stdout, with
329 this option the result XML instance will be saved onto a file.</simpara>
330 </listitem>
331 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000332 <varlistentry>
333 <term><option>--repeat</option></term>
334 <listitem>
335 <simpara>
336 Repeat 100 times, for timing or profiling.
337 </simpara>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry>
342 <term><option>--insert</option></term>
343 <listitem>
344 <simpara>
345 Test for valid insertions.
346 </simpara>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry>
351 <term><option>--compress</option></term>
352 <listitem>
353 <simpara>
354 Turn on gzip compression of output.
355 </simpara>
356 </listitem>
357 </varlistentry>
358
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000359 <varlistentry>
360 <term><option>--html</option></term>
361 <listitem>
362 <simpara>
363 Use the <acronym>HTML</acronym> parser.
364 </simpara>
365 </listitem>
366 </varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000367 <varlistentry>
368 <term><option>--xmlout</option></term>
369 <listitem>
Daniel Veillardf10ae122005-07-10 19:03:16 +0000370 <simpara>Used in conjunction with <option>--html</option>. Usually
John Fleck3cbaa6d2004-08-15 00:47:45 +0000371 when HTML is parsed the document is saved with the HTML serializer, but with
372 this option the resulting document is saved with the XML serializer. This is
373 primarily used to generate XHTML from HTML input.</simpara>
374 </listitem>
375 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000376 <varlistentry>
377 <term><option>--push</option></term>
378 <listitem>
379 <simpara>
380 Use the push mode of the parser.
381 </simpara>
382 </listitem>
383 </varlistentry>
384
385
386 <varlistentry>
387 <term><option>--memory</option></term>
388 <listitem>
389 <simpara>
390 Parse from memory.
391 </simpara>
392 </listitem>
393 </varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000394 <varlistentry>
395 <term><option>--maxmem</option> <replaceable>nnbytes</replaceable></term>
396 <listitem>
397 <simpara>Test the parser memory
398 support. <replaceable>nnbytes</replaceable> is the maximum number of bytes the
399 library is allowed to allocate. This can also be used to make sure batch
400 processing of XML files will not exhaust the virtual memory of the server
401 running them.</simpara>
402 </listitem>
403 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000404 <varlistentry>
405 <term><option>--nowarning</option></term>
406 <listitem>
407 <simpara>
408 Do not emit warnings from the parser and/or validator.
409 </simpara>
410 </listitem>
411 </varlistentry>
412
413 <varlistentry>
414 <term><option>--noblanks</option></term>
415 <listitem>
416 <simpara>
417 Drop ignorable blank spaces.
418 </simpara>
419 </listitem>
420 </varlistentry>
421
422 <varlistentry>
423 <term><option>--format</option></term>
424 <listitem>
425 <simpara>
Aleksey Sanin693c9bc2003-03-09 22:36:52 +0000426 Reformat and reindent the output. The $XMLLINT_INDENT
427 environment variable controls the indentation (default
Daniel Veillarddc07e182003-04-25 10:39:38 +0000428 value is two spaces &quot; &quot;).
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000429 </simpara>
430 </listitem>
431 </varlistentry>
432
433 <varlistentry>
434 <term><option>--testIO</option></term>
435 <listitem>
436 <simpara>
437 Test user input/output support.
438 </simpara>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry>
443 <term><option>--encode</option> <replaceable>encoding</replaceable></term>
444 <listitem>
445 <simpara>
446 Output in the given encoding.
447 </simpara>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry>
452 <term><option>--catalogs</option></term>
453 <listitem>
454 <simpara>
455 Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog
456 is used by default.
457 </simpara>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry>
462 <term><option>--nocatalogs</option></term>
463 <listitem>
464 <simpara>
465 Do not use any catalogs.
466 </simpara>
467 </listitem>
468 </varlistentry>
469
470 <varlistentry>
471 <term><option>--auto</option></term>
472 <listitem>
473 <simpara>
474 Generate a small document for testing purposes.
475 </simpara>
476 </listitem>
477 </varlistentry>
478
479 <varlistentry>
480 <term><option>--xinclude</option></term>
481 <listitem>
482 <simpara>
483 Do XInclude processing.
484 </simpara>
485 </listitem>
486 </varlistentry>
487 <varlistentry>
Daniel Veillardc14c3892004-08-16 12:34:50 +0000488 <term><option>--noxincludenode</option></term>
489 <listitem>
490 <simpara>
491 Do XInclude processing but do not generate XInclude start and end
492 nodes.
493 </simpara>
494 </listitem>
495 </varlistentry>
496 <varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000497 <term><option>--loaddtd</option></term>
498 <listitem>
499 <simpara>
500 Fetch external DTD.
501 </simpara>
502 </listitem>
503 </varlistentry>
504
505 <varlistentry>
506 <term><option>--dtdattr</option></term>
507 <listitem>
508 <simpara>
509 Fetch external DTD and populate the tree with inherited attributes.
510 </simpara>
511 </listitem>
512 </varlistentry>
MST 2001 John Fleck2323ac22001-12-14 04:24:50 +0000513 <varlistentry>
514 <term><option>--dropdtd</option></term>
515 <listitem>
516 <simpara>
517 Remove <acronym>DTD</acronym> from output.
518 </simpara>
519 </listitem>
520 </varlistentry>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000521 <varlistentry>
522 <term><option>--stream</option></term>
523 <listitem>
MDT 2003 John Fleck83c8a5c2003-04-20 16:45:07 +0000524 <simpara>Use streaming API - useful when used in combination with
525 --relaxng or --valid options for validation of files that are
526 too large to be held in memory.</simpara>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000527 </listitem>
528 </varlistentry>
529 <varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000530 <term><option>--walker</option></term>
531 <listitem>
532 <simpara>Test the walker module, which is a reader interface but for a
533 document tree, instead of using the reader API on an unparsed document it
534 works on a existing in-memory tree. Used in debugging.</simpara>
535 </listitem>
536 </varlistentry>
537 <varlistentry>
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000538 <term><option>--chkregister</option></term>
539 <listitem>
Daniel Veillardda3b29a2004-08-14 11:15:13 +0000540 <simpara>Turn on node registration. Useful for developers testing
MST 2003 John Fleck7e54be12003-01-07 03:54:25 +0000541 libxml2 node tracking code.</simpara>
542 </listitem>
543 </varlistentry>
MST 2003 John Fleckda271742003-03-25 14:05:17 +0000544 <varlistentry>
John Fleck3cbaa6d2004-08-15 00:47:45 +0000545 <term><option>--pattern</option> <replaceable>patternvalue</replaceable></term>
546 <listitem>
547 <simpara>Used to exercise the pattern recognition engine, which can be
548 used with the reader interface to the parser. It allows to select some
549 nodes in the document based on an XPath (subset) expression. Used for
550 debugging.</simpara>
551 </listitem>
552 </varlistentry>
553 <varlistentry>
MST 2003 John Fleckda271742003-03-25 14:05:17 +0000554 <term><option>--relaxng</option> <replaceable>schema</replaceable></term>
555 <listitem>
556 <simpara>Use RelaxNG file named <replaceable>schema</replaceable> for
557 validation.</simpara>
558 </listitem>
559 </varlistentry>
Daniel Veillarde8b09e42003-05-13 22:14:13 +0000560 <varlistentry>
561 <term><option>--schema</option> <replaceable>schema</replaceable></term>
562 <listitem>
563 <simpara>Use a W3C XML Schema file named <replaceable>schema</replaceable> for validation.</simpara>
564 </listitem>
565 </varlistentry>
566 <varlistentry>
567 <term>
Daniel Veillard29b17482004-08-16 00:39:03 +0000568 <option>--c14n</option></term>
Daniel Veillarde8b09e42003-05-13 22:14:13 +0000569 <listitem>
Daniel Veillard29b17482004-08-16 00:39:03 +0000570 <simpara>Use the W3C XML Canonicalisation (C14N) to
MDT 2004 John Fleckb1b3a772004-08-19 13:45:47 +0000571serialize the result of parsing to stdout. It keeps comments in
572the result.</simpara>
Daniel Veillarde8b09e42003-05-13 22:14:13 +0000573 </listitem>
574 </varlistentry>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000575 </variablelist>
576 </refsect1>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000577
578 <refsect1 id="shell">
579 <title>Shell</title>
580 <para>
581 <application>xmllint</application> offers an interactive shell mode
582 invoked with the <option>--shell</option> command. Available commands in
583 shell mode include:
584 </para>
585 <variablelist>
586 <varlistentry>
587 <term><option>base</option></term>
588 <listitem>
589 <simpara>
590 display XML base of the node
591 </simpara>
592 </listitem>
593 </varlistentry>
594 <varlistentry>
595 <term><option>bye</option></term>
596 <listitem>
597 <simpara>
598 leave shell
599 </simpara>
600 </listitem>
601 </varlistentry>
602 <varlistentry>
603 <term><option>cat <replaceable>node</replaceable></option></term>
604 <listitem>
605 <simpara>
606 Display node if given or current node.
607 </simpara>
608 </listitem>
609 </varlistentry>
610 <varlistentry>
611 <term><option>cd <replaceable>path</replaceable></option></term>
612 <listitem>
613 <simpara>
614 Change the current node to <replaceable>path</replaceable> (if given
615 and unique) or root if no argument given.
616 </simpara>
617 </listitem>
618 </varlistentry>
619 <varlistentry>
620 <term><option>dir <replaceable>path</replaceable></option></term>
621 <listitem>
622 <simpara>
623 Dumps information about the node (namespace, attributes, content).
624 </simpara>
625 </listitem>
626 </varlistentry>
627 <varlistentry>
628 <term><option>du <replaceable>path</replaceable></option></term>
629 <listitem>
630 <simpara>
631 Show the structure of the subtree under path or the current node.
632 </simpara>
633 </listitem>
634 </varlistentry>
635 <varlistentry>
636 <term><option>exit</option></term>
637 <listitem>
638 <simpara>
639 Leave the shell.
640 </simpara>
641 </listitem>
642 </varlistentry>
643 <varlistentry>
644 <term><option>help</option></term>
645 <listitem>
646 <simpara>
647 Show this help.
648 </simpara>
649 </listitem>
650 </varlistentry>
651 <varlistentry>
652 <term><option>free</option></term>
653 <listitem>
654 <simpara>
655 Display memory usage.
656 </simpara>
657 </listitem>
658 </varlistentry>
659 <varlistentry>
660 <term><option>load <replaceable>name</replaceable></option></term>
661 <listitem>
662 <simpara>
663 Load a new document with the given name.
664 </simpara>
665 </listitem>
666 </varlistentry>
667 <varlistentry>
668 <term><option>ls <replaceable>path</replaceable></option></term>
669 <listitem>
670 <simpara>
671 List contents of <replaceable>path</replaceable> (if given) or the
672 current directory.
673 </simpara>
674 </listitem>
675 </varlistentry>
676 <varlistentry>
677 <term><option>pwd</option></term>
678 <listitem>
679 <simpara>
680 Display the path to the current node.
681 </simpara>
682 </listitem>
683 </varlistentry>
684 <varlistentry>
685 <term><option>quit</option></term>
686 <listitem>
687 <simpara>
688 Leave the shell.
689 </simpara>
690 </listitem>
691 </varlistentry>
692 <varlistentry>
693 <term><option>save <replaceable>name</replaceable></option></term>
694 <listitem>
695 <simpara>
696 Saves the current document to <replaceable>name</replaceable> if
697 given or to the original name.
698 </simpara>
699 </listitem>
700 </varlistentry>
701 <varlistentry>
702 <term><option>validate</option></term>
703 <listitem>
704 <simpara>
705 Check the document for error.
706 </simpara>
707 </listitem>
708 </varlistentry>
709 <varlistentry>
710 <term><option>write <replaceable>name</replaceable></option></term>
711 <listitem>
712 <simpara>
713 Write the current node to the given filename.
714 </simpara>
715 </listitem>
716 </varlistentry>
MST 2001 John Fleck2323ac22001-12-14 04:24:50 +0000717
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000718 </variablelist>
719 </refsect1>
MST 2004 John Flecke42ae6f2004-02-27 03:26:30 +0000720<refsect1>
721 <title>Catalogs</title>
722 <para>Catalog behavior can be changed by redirecting
723 queries to the user's own set of catalogs. This can be done by setting the
724 <varname>XML_CATALOG_FILES</varname> environment variable to a list of
725 catalogs. An empty one should deactivate loading the default
726 <filename>/etc/xml/catalog</filename> default catalog.</para>
727 </refsect1>
MST 2002 John Fleck6647aed2002-12-26 02:23:24 +0000728 <refsect1>
729 <title>Debugging Catalogs</title>
730 <para>Setting the environment variable <varname>XML_DEBUG_CATALOG</varname>
731 using the command <command>&quot;export XML_DEBUG_CATALOG=&quot;</command>
732 outputs debugging information related to catalog operations.</para>
733 </refsect1>
MDT 2004 John Fleck4c76c4f2004-06-20 00:36:06 +0000734 <refsect1>
735 <title>Error Return Codes</title>
736 <para>On the completion of execution, <application>Xmllint</application>
737 returns the following error codes:</para>
738 <variablelist>
739 <varlistentry>
740 <term>0</term>
741 <listitem>
742 <simpara>No error</simpara>
743 </listitem>
744 </varlistentry>
745 <varlistentry>
746 <term>1</term>
747 <listitem>
748 <simpara>Unclassified</simpara>
749 </listitem>
750 </varlistentry>
751 <varlistentry>
752 <term>2</term>
753 <listitem>
754 <simpara>Error in DTD</simpara>
755 </listitem>
756 </varlistentry>
757 <varlistentry>
758 <term>3</term>
759 <listitem>
760 <simpara>Validation error</simpara>
761 </listitem>
762 </varlistentry>
763 <varlistentry>
764 <term>4</term>
765 <listitem>
766 <simpara>Validation error</simpara>
767 </listitem>
768 </varlistentry>
769 <varlistentry>
770 <term>5</term>
771 <listitem>
772 <simpara>Error in schema compilation</simpara>
773 </listitem>
774 </varlistentry>
775 <varlistentry>
776 <term>6</term>
777 <listitem>
778 <simpara>Error writing output</simpara>
779 </listitem>
780 </varlistentry>
781 <varlistentry>
782 <term>7</term>
783 <listitem>
784 <simpara>Error in pattern (generated when
785 <optional>--pattern</optional> option is used)</simpara>
786 </listitem>
787 </varlistentry>
788 <varlistentry>
789 <term>8</term>
790 <listitem>
791 <simpara>Error in Reader registration (generated when
792 <optional>--chkregister</optional> option is used)</simpara>
793 </listitem>
794 </varlistentry>
795 <varlistentry>
796 <term>9</term>
797 <listitem>
798 <simpara>Out of memory error</simpara>
799 </listitem>
800 </varlistentry>
801 </variablelist>
802 </refsect1>
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000803</refentry>