xmllint.xml 23.8 KB
Newer Older
1
<?xml version="1.0"?>
2 3
<?xml-stylesheet type="text/xsl"
   href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
4 5
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
6 7
    
    <!ENTITY xmllint "<command>xmllint</command>">
8
]>
9

10
<refentry>
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

<refentryinfo>
	<title>xmllint Manual</title>
	<productname>libxml2</productname>
	<copyright>
		<year>2001</year>
		<year>2004</year>
	</copyright>
	<authorgroup>
		<author>
			<firstname>John</firstname>
			<surname>Fleck</surname>
			<affiliation>
				<address>
					<email>jfleck@inkstain.net</email>
				</address>
			</affiliation>
		</author>
		<author>
			<firstname>Ziying</firstname>
			<surname>Sherwin</surname>
			<affiliation>
				<address>
					<email>sherwin@nlm.nih.gov</email>
				</address>
			</affiliation>
		</author>
		<author>
			<firstname>Heiko</firstname>
			<surname>Rupp</surname>
			<affiliation>
				<address>
					<email>hwr@pilhuhn.de</email>
				</address>
			</affiliation>
		</author>
	</authorgroup>
	<!-- date should be the date of the latest change or the release version -->
49 50 51 52
	<date>2006-03-05</date>
	<!-- still a bit buggy output, will talk to docbook-xsl upstream to fix this -->
	<!-- <releaseinfo>This is release 0.5 of the xmllint Manual.</releaseinfo> -->
	<!-- <edition>0.5</edition> -->
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
</refentryinfo>

<refmeta>
	<refentrytitle>xmllint</refentrytitle>
	<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
	<refname>xmllint</refname>
	<refpurpose>command line <acronym>XML</acronym> tool</refpurpose>
</refnamediv>

<refsynopsisdiv>
	<cmdsynopsis>
	<command>xmllint</command>
		<group choice="opt">
			<arg choice="plain"><option>--version</option></arg>
			<arg choice="plain"><option>--debug</option></arg>
			<arg choice="plain"><option>--shell</option></arg>
			<arg choice="plain"><option>--debugent</option></arg>
			<arg choice="plain"><option>--copy</option></arg>
			<arg choice="plain"><option>--recover</option></arg>
			<arg choice="plain"><option>--noent</option></arg>
			<arg choice="plain"><option>--noout</option></arg>
			<arg choice="plain"><option>--nonet</option></arg>
78
			<arg choice="plain"><option>--path "<replaceable class="option">PATH(S)</replaceable>"</option></arg>
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
			<arg choice="plain"><option>--load-trace</option></arg>
			<arg choice="plain"><option>--htmlout</option></arg>
			<arg choice="plain"><option>--nowrap</option></arg>
			<arg choice="plain"><option>--valid</option></arg>
			<arg choice="plain"><option>--postvalid</option></arg>
			<arg choice="plain"><option>--dtdvalid <replaceable class="option">URL</replaceable></option></arg>
			<arg choice="plain"><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></arg>
			<arg choice="plain"><option>--timing</option></arg>
			<arg choice="plain"><option>--output <replaceable class="option">FILE</replaceable></option></arg>
			<arg choice="plain"><option>--repeat</option></arg>
			<arg choice="plain"><option>--insert</option></arg>
			<arg choice="plain"><option>--compress</option></arg>
			<arg choice="plain"><option>--html</option></arg>
			<arg choice="plain"><option>--xmlout</option></arg>
			<arg choice="plain"><option>--push</option></arg>
			<arg choice="plain"><option>--memory</option></arg>
			<arg choice="plain"><option>--maxmem <replaceable class="option">NBBYTES</replaceable></option></arg>
			<arg choice="plain"><option>--nowarning</option></arg>
			<arg choice="plain"><option>--noblanks</option></arg>
			<arg choice="plain"><option>--nocdata</option></arg>
			<arg choice="plain"><option>--format</option></arg>
			<arg choice="plain"><option>--encode <replaceable class="option">ENCODING</replaceable></option></arg>
			<arg choice="plain"><option>--dropdtd</option></arg>
			<arg choice="plain"><option>--nsclean</option></arg>
			<arg choice="plain"><option>--testIO</option></arg>
			<arg choice="plain"><option>--catalogs</option></arg>
			<arg choice="plain"><option>--nocatalogs</option></arg>
			<arg choice="plain"><option>--auto</option></arg>
			<arg choice="plain"><option>--xinclude</option></arg>
			<arg choice="plain"><option>--noxincludenode</option></arg>
			<arg choice="plain"><option>--loaddtd</option></arg>
			<arg choice="plain"><option>--dtdattr</option></arg>
			<arg choice="plain"><option>--stream</option></arg>
			<arg choice="plain"><option>--walker</option></arg>
			<arg choice="plain"><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></arg>
			<arg choice="plain"><option>--chkregister</option></arg>
			<arg choice="plain"><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></arg>
			<arg choice="plain"><option>--schema <replaceable class="option">SCHEMA</replaceable></option></arg>
			<arg choice="plain"><option>--c14n</option></arg>
		</group>
		<group choice="req">
			<arg choice="plain" rep="repeat"><replaceable>XML-FILE(S)</replaceable></arg>
			<arg choice="plain" rep="norepeat">-</arg>
		</group>
	</cmdsynopsis>
	<cmdsynopsis>
		<command>xmllint</command>
		<arg choice="plain"><option>--help</option></arg>
	</cmdsynopsis>
</refsynopsisdiv>

130
<refsect1 id="description">
131 132 133 134 135 136 137 138 139 140
	<title>DESCRIPTION</title>
	<para>
		The &xmllint; program parses one or more XML files, specified on the
		command line as <replaceable>XML-FILE</replaceable> (or the standard
		input if the filename provided is <emphasis role="bold">-</emphasis> ).
		It prints various types of output, depending upon the options selected.
		It is useful for detecting errors both
		in <acronym>XML</acronym> code and in the <acronym>XML</acronym> parser
		itself.
	</para>
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
	<para>&xmllint; is included in <citerefentry>
		<refentrytitle>libxml</refentrytitle>
		<manvolnum>3</manvolnum>
	</citerefentry>.</para>
	<para>More information can be found at
		<itemizedlist>
			<listitem>
				<para><citerefentry>
						<refentrytitle>libxml</refentrytitle>
						<manvolnum>3</manvolnum>
					</citerefentry> web page <ulink url="http://www.xmlsoft.org/"/>
				</para>
			</listitem>
			<listitem>
				<para>
					W3C <acronym>XSLT</acronym> page <ulink url="http://www.w3.org/TR/xslt"/>
				</para>
			</listitem>
		</itemizedlist>
160
	</para>
161 162 163 164 165 166 167 168 169 170 171 172
</refsect1>

<refsect1 id="options">
	<title>OPTIONS</title>
	<para>
		&xmllint; accepts the following options (in alphabetical order):
	</para>

	<variablelist>

		<varlistentry>
	<term><option>--auto</option></term>
173
	<listitem>
174
		<para>Generate a small document for testing purposes.</para>
175
	</listitem>
176
		</varlistentry>
177

178 179
		<varlistentry>
	<term><option>--catalogs</option></term>
180
	<listitem>
181 182 183 184
		<para>
			Use the catalogs from <envar>SGML_CATALOG_FILES</envar>.
			Otherwise <filename>/etc/xml/catalog</filename> is used by default.
		</para>
185
	</listitem>
186
		</varlistentry>
187

188 189
		<varlistentry>
	<term><option>--chkregister</option></term>
190
	<listitem>
191
		<para>
192 193 194 195
			Turn on node registration. Useful for developers testing <citerefentry>
		<refentrytitle>libxml</refentrytitle>
		<manvolnum>3</manvolnum>
	</citerefentry> node tracking code.
196
		</para>
197
	</listitem>
198
		</varlistentry>
199

200 201
		<varlistentry>
	<term><option>--compress</option></term>
202
	<listitem>
203 204 205
		<para>
			Turn on <application>gzip</application> compression of output.
		</para>
206
	</listitem>
207
		</varlistentry>
208

209 210
		<varlistentry>
	<term><option>--copy</option></term>
211
	<listitem>
212
		<para>Test the internal copy implementation.</para>
213
	</listitem>
214
		</varlistentry>
215

216 217
		<varlistentry>
	<term><option>--c14n</option></term>
218
	<listitem>
219 220 221 222 223
		<para>
			Use the W3C XML Canonicalisation (<acronym>C14N</acronym>) to serialize
			the result of parsing to <filename class="devicefile">stdout</filename>.
			It keeps comments in the result.
		</para>
224
	</listitem>
225 226 227 228
		</varlistentry>

		<varlistentry>
	<term><option>--dtdvalid <replaceable class="option">URL</replaceable></option></term>
229
	<listitem>
230 231 232 233
		<para>
			Use the <acronym>DTD</acronym> specified by
			an <replaceable>URL</replaceable> for validation.
		</para>
234
	</listitem>
235
		</varlistentry>
236

237 238
		<varlistentry>
	<term><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></term>
239
	<listitem>
240 241 242 243 244
		<para>
			Use the <acronym>DTD</acronym> specified by a Public
			Identifier <replaceable>FPI</replaceable> for validation, note that this
			will require a Catalog exporting that Public Identifier to work.
		</para>
245
	</listitem>
246 247 248 249
		</varlistentry>

		<varlistentry>
	<term><option>--debug</option></term>
250
	<listitem>
251 252 253 254
		<para>
			Parse a file and output an annotated tree of the
			in-memory version of the document.
		</para>
255
	</listitem>
256 257 258 259
		</varlistentry>

		<varlistentry>
	<term><option>--debugent</option></term>
260
	<listitem>
261
		<para>Debug the entities defined in the document.</para>
262
	</listitem>
263 264 265 266
		</varlistentry>

		<varlistentry>
	<term><option>--dropdtd</option></term>
267
	<listitem>
268
		<para>Remove <acronym>DTD</acronym> from output.</para>
269
	</listitem>
270
		</varlistentry>
271

272 273
		<varlistentry>
	<term><option>--dtdattr</option></term>
274
	<listitem>
275 276 277 278
		<para>
			Fetch external <acronym>DTD</acronym> and populate the tree with
			inherited attributes.
		</para>
279
	</listitem>
280
		</varlistentry>
281

282 283
		<varlistentry>
	<term><option>--encode <replaceable class="option">ENCODING</replaceable></option></term>
284
	<listitem>
285
		<para>Output in the given encoding.</para>
286
	</listitem>
287
		</varlistentry>
288

289 290
		<varlistentry>
	<term><option>--format</option></term>
291
	<listitem>
292 293 294 295 296
		<para>
			Reformat and reindent the output. The <envar>XMLLINT_INDENT</envar>
			environment variable controls the indentation (default value is two
			spaces &quot;  &quot;).
		</para>
297
	</listitem>
298
		</varlistentry>
299

300 301
		<varlistentry>
	<term><option>--help</option></term>
302
	<listitem>
303
		<para>Print out a short usage summary for &xmllint;.</para>
304
	</listitem>
305
		</varlistentry>
306

307 308
		<varlistentry>
	<term><option>--html</option></term>
309
	<listitem>
310
		<para>Use the <acronym>HTML</acronym> parser.</para>
311
	</listitem>
312
		</varlistentry>
313

314 315
		<varlistentry>
	<term><option>--htmlout</option></term>
316
	<listitem>
317 318 319 320 321 322 323 324 325 326 327
		<para>
			Output results as an <acronym>HTML</acronym> file. This
			causes &xmllint; to output the necessary <acronym>HTML</acronym>
			tags surrounding the result tree output so the results can be
			displayed/viewed in a browser.
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><option>--insert</option></term>
328
	<listitem>
329
		<para>Test for valid insertions.</para>
330
	</listitem>
331 332 333 334
		</varlistentry>

		<varlistentry>
	<term><option>--loaddtd</option></term>
335
	<listitem>
336
		<para>Fetch external <acronym>DTD</acronym>.</para>
337
	</listitem>
338 339 340 341
		</varlistentry>

		<varlistentry>
	<term><option>--load-trace</option></term>
342
	<listitem>
343 344 345 346
		<para>
			Display all the documents loaded during the processing
			to <filename class="devicefile">stderr</filename>.
		</para>
347
	</listitem>
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364
		</varlistentry>

		<varlistentry>
	<term><option>--maxmem <replaceable class="option">NNBYTES</replaceable></option></term>
	<listitem>
		<para>
			Test the parser memory support. <replaceable>NNBYTES</replaceable>
			is the maximum number of bytes the library is allowed to allocate.
			This can also be used to make sure batch processing
			of <acronym>XML</acronym> files will not exhaust the virtual memory
			of the server running them.
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><option>--memory</option></term>
365
	<listitem>
366
		<para>Parse from memory.</para>
367
	</listitem>
368
		</varlistentry>
369

370 371
		<varlistentry>
	<term><option>--noblanks</option></term>
372
	<listitem>
373
		<para>Drop ignorable blank spaces.</para>
374
	</listitem>
375 376 377 378
		</varlistentry>

		<varlistentry>
	<term><option>--nocatalogs</option></term>
379
	<listitem>
380
		<para>Do not use any catalogs.</para>
381
	</listitem>
382 383 384 385
		</varlistentry>

		<varlistentry>
	<term><option>--nocdata</option></term>
386
	<listitem>
387
		<para>Substitute CDATA section by equivalent text nodes.</para>
388
	</listitem>
389 390 391 392
		</varlistentry>

		<varlistentry>
	<term><option>--noent</option></term>
393
	<listitem>
394 395 396 397
		<para>
			Substitute entity values for entity references. By default, &xmllint;
			leaves entity references in place.
		</para>
398
	</listitem>
399
		</varlistentry>
400

401 402
		<varlistentry>
	<term><option>--nonet</option></term>
403
	<listitem>
404 405 406
		<para>
			Do not use the Internet to fetch <acronym>DTD</acronym>s or entities.
		</para>
407
	</listitem>
408 409 410 411
		</varlistentry>

		<varlistentry>
	<term><option>--noout</option></term>
412
	<listitem>
413 414 415
		<para>
			Suppress output. By default, &xmllint; outputs the result tree.
		</para>
416
	</listitem>
417 418 419
		</varlistentry>

		<varlistentry>
420 421
	<term><option>--nowarning</option></term>
	<listitem>
422
		<para>Do not emit warnings from the parser and/or validator.</para>
423
	</listitem>
424
		</varlistentry>
425

426 427
		<varlistentry>
	<term><option>--nowrap</option></term>
428
	<listitem>
429
		<para>Do not output <acronym>HTML</acronym> doc wrapper.</para>
430
	</listitem>
431
		</varlistentry>
432

433 434
		<varlistentry>
	<term><option>--noxincludenode</option></term>
435
	<listitem>
436 437 438
		<para>
			Do XInclude processing but do not generate XInclude start and end nodes.
		</para>
439
	</listitem>
440
		</varlistentry>
441

442 443
		<varlistentry>
	<term><option>--nsclean</option></term>
444
	<listitem>
445
		<para>Remove redundant namespace declarations.</para>
446
	</listitem>
447
		</varlistentry>
448

449 450
		<varlistentry>
	<term><option>--output <replaceable class="option">FILE</replaceable></option></term>
451
	<listitem>
452 453 454 455 456 457
		<para>
			Define a file path where &xmllint; will save the result of parsing.
			Usually the programs build a tree and save it
			on <filename class="devicefile">stdout</filename>, with this option
			the result <acronym>XML</acronym> instance will be saved onto a file.
		</para>
458
	</listitem>
459 460 461
		</varlistentry>

		<varlistentry>
462
	<term><option>--path "<replaceable class="option">PATH(S)</replaceable>"</option></term>
463
	<listitem>
464 465 466 467 468
		<para>
			Use the (space- or colon-separated) list of filesystem paths specified
			by <replaceable>PATHS</replaceable> to load <acronym>DTD</acronym>s or
			entities. Enclose space-separated lists by quotation marks.
		</para>
469
	</listitem>
470
		</varlistentry>
471

472 473
		<varlistentry>
	<term><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></term>
474
	<listitem>
475 476 477 478 479 480
		<para>
			Used to exercise the pattern recognition engine, which can be used
			with the reader interface to the parser. It allows to select some
			nodes in the document based on an XPath (subset) expression. Used
			for debugging.
		</para>
481
	</listitem>
482 483 484 485
		</varlistentry>

		<varlistentry>
	<term><option>--postvalid</option></term>
486
	<listitem>
487
		<para>Validate after parsing is completed.</para>
488
	</listitem>
489
		</varlistentry>
490

491 492
		<varlistentry>
	<term><option>--push</option></term>
493
	<listitem>
494
		<para>Use the push mode of the parser.</para>
495
	</listitem>
496 497 498 499
		</varlistentry>

		<varlistentry>
	<term><option>--recover</option></term>
500
	<listitem>
501
		<para>Output any parsable portions of an invalid document.</para>
502
	</listitem>
503 504 505 506
		</varlistentry>

		<varlistentry>
	<term><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></term>
507
	<listitem>
508 509 510 511
		<para>
			Use RelaxNG file named <replaceable class="option">SCHEMA</replaceable>
			for validation.
		</para>
512
	</listitem>
513 514 515 516
		</varlistentry>

		<varlistentry>
	<term><option>--repeat</option></term>
517
	<listitem>
518
		<para>Repeat 100 times, for timing or profiling.</para>
519
	</listitem>
520 521 522 523 524 525 526 527 528 529 530 531 532 533
		</varlistentry>

		<varlistentry>
	<term><option>--schema <replaceable>SCHEMA</replaceable></option></term>
	<listitem>
		<para>
			Use a W3C XML Schema file named <replaceable>SCHEMA</replaceable>
			for validation.
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><option>--shell</option></term>
534
	<listitem>
535 536
		<para>
			Run a navigating shell. Details on available commands in shell mode
537
			are below (see <xref linkend="shell"/>).
538
		</para>
539
	</listitem>
540 541 542
		</varlistentry>

		<varlistentry>
543 544
	<term><option>--stream</option></term>
	<listitem>
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
		<para>
			Use streaming API - useful when  used  in combination
			with <option>--relaxng</option> or <option>--valid</option> options
			for validation of files that are too large to be held in memory.
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><option>--testIO</option></term>
	<listitem>
		<para>Test user input/output support.</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><option>--timing</option></term>
	<listitem>
		<para>
			Output information about the time it takes &xmllint; to perform the
			various steps.
		</para>
567
	</listitem>
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587
		</varlistentry>

		<varlistentry>
	<term><option>--valid</option></term>
	<listitem>
		<para>
			Determine if the document is a valid instance of the included
			Document Type Definition (<acronym>DTD</acronym>).
			A <acronym>DTD</acronym> to be validated against also can be
			specified at the command line using the <option>--dtdvalid</option>
			option. By default, &xmllint; also checks to determine if the
			document is well-formed.
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><option>--version</option></term>
	<listitem>
		<para>
588 589 590 591
			Display the version of <citerefentry>
		<refentrytitle>libxml</refentrytitle>
		<manvolnum>3</manvolnum>
	</citerefentry> used.
592 593 594 595 596
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
597 598
	<term><option>--walker</option></term>
	<listitem>
599 600 601 602 603 604
		<para>
			Test the walker module, which is a reader interface but for a
			document tree, instead of using the reader <acronym>API</acronym> on
			an unparsed document it works on a existing in-memory tree. Used in
			debugging.
		</para>
605
	</listitem>
606 607 608 609
		</varlistentry>

		<varlistentry>
	<term><option>--xinclude</option></term>
610
	<listitem>
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642
		<para>Do XInclude processing.</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><option>--xmlout</option></term>
	<listitem>
		<para>
			Used in conjunction with <option>--html</option>. Usually
			when <acronym>HTML</acronym> is parsed the document is saved with
			the <acronym>HTML</acronym> serializer, but with this option the
			resulting document is saved with the <acronym>XML</acronym>
			serializer. This is primarily used to
			generate <acronym>XHTML</acronym>
			from <acronym>HTML</acronym> input.
		</para>
	</listitem>
		</varlistentry>

	</variablelist>
</refsect1>

<refsect1 id="shell">
	<title>SHELL COMMANDS</title>
	<para>
		&xmllint; offers an interactive shell mode invoked with
		the <option>--shell</option> command. Available commands in shell mode
		include (in alphabetical order):
	</para>
	<variablelist>

		<varlistentry>
643
	<term><command>base</command></term>
644
	<listitem>
645
		<para>Display <acronym>XML</acronym> base of the node.</para>
646
	</listitem>
647 648 649
		</varlistentry>

		<varlistentry>
650
	<term><command>bye</command></term>
651
	<listitem>
652
		<para>Leave the shell.</para>
653
	</listitem>
654 655 656
		</varlistentry>

		<varlistentry>
657
	<term><command>cat <replaceable>NODE</replaceable></command></term>
658
	<listitem>
659
		<para>Display the given node or the current one.</para>
660
	</listitem>
661 662 663
		</varlistentry>

		<varlistentry>
664
	<term><command>cd <replaceable>PATH</replaceable></command></term>
665
	<listitem>
666 667 668 669
		<para>
			Change the current node to the given path (if unique) or root if no
			argument is given.
		</para>
670
	</listitem>
671 672 673
		</varlistentry>

		<varlistentry>
674
	<term><command>dir <replaceable>PATH</replaceable></command></term>
675
	<listitem>
676 677 678
		<para>
			Dumps information about the node (namespace, attributes, content).
		</para>
679
	</listitem>
680 681 682
		</varlistentry>

		<varlistentry>
683
	<term><command>du <replaceable>PATH</replaceable></command></term>
684
	<listitem>
685 686 687
		<para>
			Show the structure of the subtree under the given path or the current node.
		</para>
688
	</listitem>
689 690 691
		</varlistentry>

		<varlistentry>
692
	<term><command>exit</command></term>
693
	<listitem>
694
		<para>Leave the shell.</para>
695
	</listitem>
696 697 698
		</varlistentry>

		<varlistentry>
699
	<term><command>help</command></term>
700
	<listitem>
701
		<para>Show this help.</para>
702
	</listitem>
703 704 705
		</varlistentry>

		<varlistentry>
706
	<term><command>free</command></term>
707
	<listitem>
708
		<para>Display memory usage.</para>
709
	</listitem>
710 711 712
		</varlistentry>

		<varlistentry>
713
	<term><command>load <replaceable>FILENAME</replaceable></command></term>
714
	<listitem>
715
		<para>Load a new document with the given filename.</para>
716
	</listitem>
717 718 719
		</varlistentry>

		<varlistentry>
720
	<term><command>ls <replaceable>PATH</replaceable></command></term>
721
	<listitem>
722
		<para>List contents of the given path or the current directory.</para>
723
	</listitem>
724 725 726
		</varlistentry>

		<varlistentry>
727
	<term><command>pwd</command></term>
728
	<listitem>
729
		<para>Display the path to the current node.</para>
730
	</listitem>
731 732 733
		</varlistentry>

		<varlistentry>
734
	<term><command>quit</command></term>
735
	<listitem>
736
		<para>Leave the shell.</para>
737
	</listitem>
738 739 740
		</varlistentry>

		<varlistentry>
741
	<term><command>save <replaceable>FILENAME</replaceable></command></term>
742
	<listitem>
743 744 745
		<para>
			Save the current document to the given filename or to the original name.
		</para>
746
	</listitem>
747 748 749
		</varlistentry>

		<varlistentry>
750 751
	<term><option>validate</option></term>
	<listitem>
752
		<para>Check the document for errors.</para>
753
	</listitem>
754 755 756
		</varlistentry>

		<varlistentry>
757
	<term><command>write <replaceable>FILENAME</replaceable></command></term>
758
	<listitem>
759 760 761 762 763 764 765
		<para>Write the current node to the given filename.</para>
	</listitem>
		</varlistentry>

	</variablelist>
</refsect1>

766
<refsect1 id="environment">
767 768 769 770
	<title>ENVIRONMENT</title>
	<variablelist>

		<varlistentry>
771
	<term><envar>SGML_CATALOG_FILES</envar></term>
772
	<listitem>
773
		<para>to be written ...</para>
774
	</listitem>
775 776 777
		</varlistentry>

		<varlistentry>
778
	<term><envar>XML_CATALOG_FILES</envar></term>
779
	<listitem>
780 781 782 783 784 785 786
		<para>
			Catalog behavior can be changed by redirecting queries to the user's
			own set of catalogs. This can be done by setting
			the <envar>XML_CATALOG_FILES</envar> environment variable to a list
			of catalogs. An empty one should deactivate loading the
			default <filename>/etc/xml/catalog</filename> default catalog.
		</para>
787
	</listitem>
788 789 790
		</varlistentry>

		<varlistentry>
791
	<term><envar>XML_DEBUG_CATALOG</envar></term>
792
	<listitem>
793 794 795 796 797
		<para>
			Setting the environment variable <envar>XML_DEBUG_CATALOG</envar>
			using the <command>export</command> command outputs debugging information
			related to catalog operations.
		</para>
798
	</listitem>
799 800 801
		</varlistentry>

		<varlistentry>
802
	<term><envar>XMLLINT_INDENT</envar></term>
803
	<listitem>
804
		<para>to be written ...</para>
805 806 807 808 809 810
	</listitem>
		</varlistentry>
		
	</variablelist>
</refsect1>

811
<refsect1 id="diagnostics">
812 813 814 815
	<title>DIAGNOSTICS</title>
	<para>
		On the completion of execution, &xmllint; returns the following error codes:
	</para>
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895
	<!-- better use segmentedlist element later,
	     which is currently only supported in snapshots -->
	<variablelist>

		<varlistentry>
	<term><errorcode>0</errorcode></term>
	<listitem>
		<para>No error</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>1</errorcode></term>
	<listitem>
		<para>Unclassified</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>2</errorcode></term>
	<listitem>
		<para>Error in <acronym>DTD</acronym></para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>3</errorcode></term>
	<listitem>
		<para>Validation error</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>4</errorcode></term>
	<listitem>
		<para>Validation error</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>5</errorcode></term>
	<listitem>
		<para>Error in schema compilation</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>6</errorcode></term>
	<listitem>
		<para>Error writing output</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>7</errorcode></term>
	<listitem>
		<para>
			Error in pattern (generated when <option>--pattern</option> option is used)
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>8</errorcode></term>
	<listitem>
		<para>
			Error in Reader registration (generated
			when <option>--chkregister</option> option is used)
		</para>
	</listitem>
		</varlistentry>

		<varlistentry>
	<term><errorcode>9</errorcode></term>
	<listitem>
		<para>Out of memory error</para>
	</listitem>
		</varlistentry>

	</variablelist>
896
</refsect1>
897

898 899 900 901 902 903 904 905
<refsect1 id="seealso">
	<title>SEE ALSO</title>
	<para>
		<citerefentry>
			<refentrytitle>libxml</refentrytitle>
			<manvolnum>3</manvolnum>
		</citerefentry>
	</para>
906 907
</refsect1>

908
</refentry>