Home | History | Annotate | Download | only in doc
      1 <?xml version="1.0"?>
      2 <?xml-stylesheet type="text/xsl"
      3    href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
      4 <!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     <!ENTITY xmllint "<command>xmllint</command>">
      8 ]>
      9 
     10 <refentry>
     11 
     12 <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 (a] 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 (a] 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 (a] pilhuhn.de</email>
     44 				</address>
     45 			</affiliation>
     46 		</author>
     47 	</authorgroup>
     48 	<!-- date should be the date of the latest change or the release version -->
     49 	<date>$Date$</date>
     50 	<!-- still a bit buggy output, will talk to docbook-xsl upstream to fix this -->
     51 	<!-- <releaseinfo>This is release 0.5 of the xmllint Manual.</releaseinfo> -->
     52 	<!-- <edition>0.5</edition> -->
     53 </refentryinfo>
     54 
     55 <refmeta>
     56 	<refentrytitle>xmllint</refentrytitle>
     57 	<manvolnum>1</manvolnum>
     58 </refmeta>
     59 
     60 <refnamediv>
     61 	<refname>xmllint</refname>
     62 	<refpurpose>command line <acronym>XML</acronym> tool</refpurpose>
     63 </refnamediv>
     64 
     65 <refsynopsisdiv>
     66 	<cmdsynopsis>
     67 	<command>xmllint</command>
     68 		<group choice="opt">
     69 			<arg choice="plain"><option>--version</option></arg>
     70 			<arg choice="plain"><option>--debug</option></arg>
     71 			<arg choice="plain"><option>--shell</option></arg>
     72 			<arg choice="plain"><option>--xpath "<replaceable class="option">XPath_expression</replaceable>"</option></arg>
     73 			<arg choice="plain"><option>--debugent</option></arg>
     74 			<arg choice="plain"><option>--copy</option></arg>
     75 			<arg choice="plain"><option>--recover</option></arg>
     76 			<arg choice="plain"><option>--noent</option></arg>
     77 			<arg choice="plain"><option>--noout</option></arg>
     78 			<arg choice="plain"><option>--nonet</option></arg>
     79 			<arg choice="plain"><option>--path "<replaceable class="option">PATH(S)</replaceable>"</option></arg>
     80 			<arg choice="plain"><option>--load-trace</option></arg>
     81 			<arg choice="plain"><option>--htmlout</option></arg>
     82 			<arg choice="plain"><option>--nowrap</option></arg>
     83 			<arg choice="plain"><option>--valid</option></arg>
     84 			<arg choice="plain"><option>--postvalid</option></arg>
     85 			<arg choice="plain"><option>--dtdvalid <replaceable class="option">URL</replaceable></option></arg>
     86 			<arg choice="plain"><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></arg>
     87 			<arg choice="plain"><option>--timing</option></arg>
     88 			<arg choice="plain"><option>--output <replaceable class="option">FILE</replaceable></option></arg>
     89 			<arg choice="plain"><option>--repeat</option></arg>
     90 			<arg choice="plain"><option>--insert</option></arg>
     91 			<arg choice="plain"><option>--compress</option></arg>
     92 			<arg choice="plain"><option>--html</option></arg>
     93 			<arg choice="plain"><option>--xmlout</option></arg>
     94 			<arg choice="plain"><option>--push</option></arg>
     95 			<arg choice="plain"><option>--memory</option></arg>
     96 			<arg choice="plain"><option>--maxmem <replaceable class="option">NBBYTES</replaceable></option></arg>
     97 			<arg choice="plain"><option>--nowarning</option></arg>
     98 			<arg choice="plain"><option>--noblanks</option></arg>
     99 			<arg choice="plain"><option>--nocdata</option></arg>
    100 			<arg choice="plain"><option>--format</option></arg>
    101 			<arg choice="plain"><option>--encode <replaceable class="option">ENCODING</replaceable></option></arg>
    102 			<arg choice="plain"><option>--dropdtd</option></arg>
    103 			<arg choice="plain"><option>--nsclean</option></arg>
    104 			<arg choice="plain"><option>--testIO</option></arg>
    105 			<arg choice="plain"><option>--catalogs</option></arg>
    106 			<arg choice="plain"><option>--nocatalogs</option></arg>
    107 			<arg choice="plain"><option>--auto</option></arg>
    108 			<arg choice="plain"><option>--xinclude</option></arg>
    109 			<arg choice="plain"><option>--noxincludenode</option></arg>
    110 			<arg choice="plain"><option>--loaddtd</option></arg>
    111 			<arg choice="plain"><option>--dtdattr</option></arg>
    112 			<arg choice="plain"><option>--stream</option></arg>
    113 			<arg choice="plain"><option>--walker</option></arg>
    114 			<arg choice="plain"><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></arg>
    115 			<arg choice="plain"><option>--chkregister</option></arg>
    116 			<arg choice="plain"><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></arg>
    117 			<arg choice="plain"><option>--schema <replaceable class="option">SCHEMA</replaceable></option></arg>
    118 			<arg choice="plain"><option>--c14n</option></arg>
    119 		</group>
    120 		<group choice="req">
    121 			<arg choice="plain" rep="repeat"><replaceable>XML-FILE(S)</replaceable></arg>
    122 			<arg choice="plain" rep="norepeat">-</arg>
    123 		</group>
    124 	</cmdsynopsis>
    125 	<cmdsynopsis>
    126 		<command>xmllint</command>
    127 		<arg choice="plain"><option>--help</option></arg>
    128 	</cmdsynopsis>
    129 </refsynopsisdiv>
    130 
    131 <refsect1 id="description">
    132 	<title>DESCRIPTION</title>
    133 	<para>
    134 		The &xmllint; program parses one or more <acronym>XML</acronym> files,
    135 		specified on the command line as <replaceable>XML-FILE</replaceable>
    136 		(or the standard input if the filename provided
    137 		is <emphasis role="bold">-</emphasis> ). It prints various types of
    138 		output, depending upon the options selected. It is useful for detecting
    139 		errors both in <acronym>XML</acronym> code and in
    140 		the <acronym>XML</acronym> parser itself.
    141 	</para>
    142 	<para>&xmllint; is included in <citerefentry>
    143 		<refentrytitle>libxml</refentrytitle>
    144 		<manvolnum>3</manvolnum>
    145 	</citerefentry>.</para>
    146 </refsect1>
    147 
    148 <refsect1 id="options">
    149 	<title>OPTIONS</title>
    150 	<para>
    151 		&xmllint; accepts the following options (in alphabetical order):
    152 	</para>
    153 
    154 	<variablelist>
    155 
    156 		<varlistentry>
    157 	<term><option>--auto</option></term>
    158 	<listitem>
    159 		<para>Generate a small document for testing purposes.</para>
    160 	</listitem>
    161 		</varlistentry>
    162 
    163 		<varlistentry>
    164 	<term><option>--catalogs</option></term>
    165 	<listitem>
    166 		<para>
    167 			Use the <acronym>SGML</acronym> catalog(s) from <envar>SGML_CATALOG_FILES</envar>.
    168 			Otherwise <acronym>XML</acronym> catalogs starting
    169 			from <filename>/etc/xml/catalog</filename> are used by default.
    170 		</para>
    171 	</listitem>
    172 		</varlistentry>
    173 
    174 		<varlistentry>
    175 	<term><option>--chkregister</option></term>
    176 	<listitem>
    177 		<para>
    178 			Turn on node registration. Useful for developers testing <citerefentry>
    179 		<refentrytitle>libxml</refentrytitle>
    180 		<manvolnum>3</manvolnum>
    181 	</citerefentry> node tracking code.
    182 		</para>
    183 	</listitem>
    184 		</varlistentry>
    185 
    186 		<varlistentry>
    187 	<term><option>--compress</option></term>
    188 	<listitem>
    189 		<para>
    190 			Turn on <citerefentry>
    191 		<refentrytitle>gzip</refentrytitle>
    192 		<manvolnum>1</manvolnum>
    193 	</citerefentry> compression of output.
    194 		</para>
    195 	</listitem>
    196 		</varlistentry>
    197 
    198 		<varlistentry>
    199 	<term><option>--copy</option></term>
    200 	<listitem>
    201 		<para>Test the internal copy implementation.</para>
    202 	</listitem>
    203 		</varlistentry>
    204 
    205 		<varlistentry>
    206 	<term><option>--c14n</option></term>
    207 	<listitem>
    208 		<para>
    209 			Use the W3C <acronym>XML</acronym> Canonicalisation (<acronym>C14N</acronym>) to
    210 			serialize the result of parsing to <filename class="devicefile">stdout</filename>.
    211 			It keeps comments in the result.
    212 		</para>
    213 	</listitem>
    214 		</varlistentry>
    215 
    216 		<varlistentry>
    217 	<term><option>--dtdvalid <replaceable class="option">URL</replaceable></option></term>
    218 	<listitem>
    219 		<para>
    220 			Use the <acronym>DTD</acronym> specified by
    221 			an <replaceable>URL</replaceable> for validation.
    222 		</para>
    223 	</listitem>
    224 		</varlistentry>
    225 
    226 		<varlistentry>
    227 	<term><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></term>
    228 	<listitem>
    229 		<para>
    230 			Use the <acronym>DTD</acronym> specified by a Formal Public
    231 			Identifier <replaceable>FPI</replaceable> for validation, note that this
    232 			will require a catalog exporting that Formal Public Identifier to work.
    233 		</para>
    234 	</listitem>
    235 		</varlistentry>
    236 
    237 		<varlistentry>
    238 	<term><option>--debug</option></term>
    239 	<listitem>
    240 		<para>
    241 			Parse a file and output an annotated tree of the
    242 			in-memory version of the document.
    243 		</para>
    244 	</listitem>
    245 		</varlistentry>
    246 
    247 		<varlistentry>
    248 	<term><option>--debugent</option></term>
    249 	<listitem>
    250 		<para>Debug the entities defined in the document.</para>
    251 	</listitem>
    252 		</varlistentry>
    253 
    254 		<varlistentry>
    255 	<term><option>--dropdtd</option></term>
    256 	<listitem>
    257 		<para>Remove <acronym>DTD</acronym> from output.</para>
    258 	</listitem>
    259 		</varlistentry>
    260 
    261 		<varlistentry>
    262 	<term><option>--dtdattr</option></term>
    263 	<listitem>
    264 		<para>
    265 			Fetch external <acronym>DTD</acronym> and populate the tree with
    266 			inherited attributes.
    267 		</para>
    268 	</listitem>
    269 		</varlistentry>
    270 
    271 		<varlistentry>
    272 	<term><option>--encode <replaceable class="option">ENCODING</replaceable></option></term>
    273 	<listitem>
    274 		<para>Output in the given encoding. Note that this works for full document not fragments or result from XPath queries.</para>
    275 	</listitem>
    276 		</varlistentry>
    277 
    278 		<varlistentry>
    279 	<term><option>--format</option></term>
    280 	<listitem>
    281 		<para>
    282 			Reformat and reindent the output. The <envar>XMLLINT_INDENT</envar>
    283 			environment variable controls the indentation. The default value is two
    284 			spaces &quot;  &quot;).
    285 		</para>
    286 	</listitem>
    287 		</varlistentry>
    288 
    289 		<varlistentry>
    290 	<term><option>--help</option></term>
    291 	<listitem>
    292 		<para>Print out a short usage summary for &xmllint;.</para>
    293 	</listitem>
    294 		</varlistentry>
    295 
    296 		<varlistentry>
    297 	<term><option>--html</option></term>
    298 	<listitem>
    299 		<para>Use the <acronym>HTML</acronym> parser.</para>
    300 	</listitem>
    301 		</varlistentry>
    302 
    303 		<varlistentry>
    304 	<term><option>--htmlout</option></term>
    305 	<listitem>
    306 		<para>
    307 			Output results as an <acronym>HTML</acronym> file. This
    308 			causes &xmllint; to output the necessary <acronym>HTML</acronym>
    309 			tags surrounding the result tree output so the results can be
    310 			displayed/viewed in a browser.
    311 		</para>
    312 	</listitem>
    313 		</varlistentry>
    314 
    315 		<varlistentry>
    316 	<term><option>--insert</option></term>
    317 	<listitem>
    318 		<para>Test for valid insertions.</para>
    319 	</listitem>
    320 		</varlistentry>
    321 
    322 		<varlistentry>
    323 	<term><option>--loaddtd</option></term>
    324 	<listitem>
    325 		<para>Fetch an external <acronym>DTD</acronym>.</para>
    326 	</listitem>
    327 		</varlistentry>
    328 
    329 		<varlistentry>
    330 	<term><option>--load-trace</option></term>
    331 	<listitem>
    332 		<para>
    333 			Display all the documents loaded during the processing
    334 			to <filename class="devicefile">stderr</filename>.
    335 		</para>
    336 	</listitem>
    337 		</varlistentry>
    338 
    339 		<varlistentry>
    340 	<term><option>--maxmem <replaceable class="option">NNBYTES</replaceable></option></term>
    341 	<listitem>
    342 		<para>
    343 			Test the parser memory support. <replaceable>NNBYTES</replaceable>
    344 			is the maximum number of bytes the library is allowed to allocate.
    345 			This can also be used to make sure batch processing
    346 			of <acronym>XML</acronym> files will not exhaust the virtual memory
    347 			of the server running them.
    348 		</para>
    349 	</listitem>
    350 		</varlistentry>
    351 
    352 		<varlistentry>
    353 	<term><option>--memory</option></term>
    354 	<listitem>
    355 		<para>Parse from memory.</para>
    356 	</listitem>
    357 		</varlistentry>
    358 
    359 		<varlistentry>
    360 	<term><option>--noblanks</option></term>
    361 	<listitem>
    362 		<para>Drop ignorable blank spaces.</para>
    363 	</listitem>
    364 		</varlistentry>
    365 
    366 		<varlistentry>
    367 	<term><option>--nocatalogs</option></term>
    368 	<listitem>
    369 		<para>Do not use any catalogs.</para>
    370 	</listitem>
    371 		</varlistentry>
    372 
    373 		<varlistentry>
    374 	<term><option>--nocdata</option></term>
    375 	<listitem>
    376 		<para>Substitute CDATA section by equivalent text nodes.</para>
    377 	</listitem>
    378 		</varlistentry>
    379 
    380 		<varlistentry>
    381 	<term><option>--noent</option></term>
    382 	<listitem>
    383 		<para>
    384 			Substitute entity values for entity references. By default, &xmllint;
    385 			leaves entity references in place.
    386 		</para>
    387 	</listitem>
    388 		</varlistentry>
    389 
    390 		<varlistentry>
    391 	<term><option>--nonet</option></term>
    392 	<listitem>
    393 		<para>
    394 			Do not use the Internet to fetch <acronym>DTD</acronym>s or entities.
    395 		</para>
    396 	</listitem>
    397 		</varlistentry>
    398 
    399 		<varlistentry>
    400 	<term><option>--noout</option></term>
    401 	<listitem>
    402 		<para>
    403 			Suppress output. By default, &xmllint; outputs the result tree.
    404 		</para>
    405 	</listitem>
    406 		</varlistentry>
    407 
    408 		<varlistentry>
    409 	<term><option>--nowarning</option></term>
    410 	<listitem>
    411 		<para>Do not emit warnings from the parser and/or validator.</para>
    412 	</listitem>
    413 		</varlistentry>
    414 
    415 		<varlistentry>
    416 	<term><option>--nowrap</option></term>
    417 	<listitem>
    418 		<para>Do not output <acronym>HTML</acronym> doc wrapper.</para>
    419 	</listitem>
    420 		</varlistentry>
    421 
    422 		<varlistentry>
    423 	<term><option>--noxincludenode</option></term>
    424 	<listitem>
    425 		<para>
    426 			Do XInclude processing but do not generate XInclude start and end nodes.
    427 		</para>
    428 	</listitem>
    429 		</varlistentry>
    430 
    431 		<varlistentry>
    432 	<term><option>--nsclean</option></term>
    433 	<listitem>
    434 		<para>Remove redundant namespace declarations.</para>
    435 	</listitem>
    436 		</varlistentry>
    437 
    438 		<varlistentry>
    439 	<term><option>--output <replaceable class="option">FILE</replaceable></option></term>
    440 	<listitem>
    441 		<para>
    442 			Define a file path where &xmllint; will save the result of parsing.
    443 			Usually the programs build a tree and save it
    444 			on <filename class="devicefile">stdout</filename>, with this option
    445 			the result <acronym>XML</acronym> instance will be saved onto a file.
    446 		</para>
    447 	</listitem>
    448 		</varlistentry>
    449 
    450 		<varlistentry>
    451 	<term><option>--path "<replaceable class="option">PATH(S)</replaceable>"</option></term>
    452 	<listitem>
    453 		<para>
    454 			Use the (space- or colon-separated) list of filesystem paths specified
    455 			by <replaceable>PATHS</replaceable> to load <acronym>DTD</acronym>s or
    456 			entities. Enclose space-separated lists by quotation marks.
    457 		</para>
    458 	</listitem>
    459 		</varlistentry>
    460 
    461 		<varlistentry>
    462 	<term><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></term>
    463 	<listitem>
    464 		<para>
    465 			Used to exercise the pattern recognition engine, which can be used
    466 			with the reader interface to the parser. It allows to select some
    467 			nodes in the document based on an XPath (subset) expression. Used
    468 			for debugging.
    469 		</para>
    470 	</listitem>
    471 		</varlistentry>
    472 
    473 		<varlistentry>
    474 	<term><option>--postvalid</option></term>
    475 	<listitem>
    476 		<para>Validate after parsing has completed.</para>
    477 	</listitem>
    478 		</varlistentry>
    479 
    480 		<varlistentry>
    481 	<term><option>--push</option></term>
    482 	<listitem>
    483 		<para>Use the push mode of the parser.</para>
    484 	</listitem>
    485 		</varlistentry>
    486 
    487 		<varlistentry>
    488 	<term><option>--recover</option></term>
    489 	<listitem>
    490 		<para>Output any parsable portions of an invalid document.</para>
    491 	</listitem>
    492 		</varlistentry>
    493 
    494 		<varlistentry>
    495 	<term><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></term>
    496 	<listitem>
    497 		<para>
    498 			Use RelaxNG file named <replaceable class="option">SCHEMA</replaceable>
    499 			for validation.
    500 		</para>
    501 	</listitem>
    502 		</varlistentry>
    503 
    504 		<varlistentry>
    505 	<term><option>--repeat</option></term>
    506 	<listitem>
    507 		<para>Repeat 100 times, for timing or profiling.</para>
    508 	</listitem>
    509 		</varlistentry>
    510 
    511 		<varlistentry>
    512 	<term><option>--schema <replaceable>SCHEMA</replaceable></option></term>
    513 	<listitem>
    514 		<para>
    515 			Use a W3C <acronym>XML</acronym> Schema file
    516 			named <replaceable>SCHEMA</replaceable> for validation.
    517 		</para>
    518 	</listitem>
    519 		</varlistentry>
    520 
    521 		<varlistentry>
    522 	<term><option>--shell</option></term>
    523 	<listitem>
    524 		<para>
    525 			Run a navigating shell. Details on available commands in shell mode
    526 			are below (see <xref linkend="shell"/>).
    527 		</para>
    528 	</listitem>
    529 		</varlistentry>
    530 
    531 		<varlistentry>
    532 	<term><option>--xpath "<replaceable class="option">XPath_expression</replaceable>"</option></term>
    533 	<listitem>
    534 		<para>
    535 			Run an XPath expression given as argument and print the
    536 			result. In case of a nodeset result, each node in the
    537 			node set is serialized in full in the output. In case
    538 			of an empty node set the "XPath set is empty" result
    539 			will be shown and an error exit code will be returned.
    540 		</para>
    541 	</listitem>
    542 		</varlistentry>
    543 
    544 		<varlistentry>
    545 	<term><option>--stream</option></term>
    546 	<listitem>
    547 		<para>
    548 			Use streaming <acronym>API</acronym> - useful when used in combination
    549 			with <option>--relaxng</option> or <option>--valid</option> options
    550 			for validation of files that are too large to be held in memory.
    551 		</para>
    552 	</listitem>
    553 		</varlistentry>
    554 
    555 		<varlistentry>
    556 	<term><option>--testIO</option></term>
    557 	<listitem>
    558 		<para>Test user input/output support.</para>
    559 	</listitem>
    560 		</varlistentry>
    561 
    562 		<varlistentry>
    563 	<term><option>--timing</option></term>
    564 	<listitem>
    565 		<para>
    566 			Output information about the time it takes &xmllint; to perform the
    567 			various steps.
    568 		</para>
    569 	</listitem>
    570 		</varlistentry>
    571 
    572 		<varlistentry>
    573 	<term><option>--valid</option></term>
    574 	<listitem>
    575 		<para>
    576 			Determine if the document is a valid instance of the included
    577 			Document Type Definition (<acronym>DTD</acronym>).
    578 			A <acronym>DTD</acronym> to be validated against also can be
    579 			specified at the command line using the <option>--dtdvalid</option>
    580 			option. By default, &xmllint; also checks to determine if the
    581 			document is well-formed.
    582 		</para>
    583 	</listitem>
    584 		</varlistentry>
    585 
    586 		<varlistentry>
    587 	<term><option>--version</option></term>
    588 	<listitem>
    589 		<para>
    590 			Display the version of <citerefentry>
    591 		<refentrytitle>libxml</refentrytitle>
    592 		<manvolnum>3</manvolnum>
    593 	</citerefentry> used.
    594 		</para>
    595 	</listitem>
    596 		</varlistentry>
    597 
    598 		<varlistentry>
    599 	<term><option>--walker</option></term>
    600 	<listitem>
    601 		<para>
    602 			Test the walker module, which is a reader interface but for a
    603 			document tree, instead of using the reader <acronym>API</acronym> on
    604 			an unparsed document it works on an existing in-memory tree. Used for
    605 			debugging.
    606 		</para>
    607 	</listitem>
    608 		</varlistentry>
    609 
    610 		<varlistentry>
    611 	<term><option>--xinclude</option></term>
    612 	<listitem>
    613 		<para>Do XInclude processing.</para>
    614 	</listitem>
    615 		</varlistentry>
    616 
    617 		<varlistentry>
    618 	<term><option>--xmlout</option></term>
    619 	<listitem>
    620 		<para>
    621 			Used in conjunction with <option>--html</option>. Usually
    622 			when <acronym>HTML</acronym> is parsed the document is saved with
    623 			the <acronym>HTML</acronym> serializer. But with this option the
    624 			resulting document is saved with the <acronym>XML</acronym>
    625 			serializer. This is primarily used to
    626 			generate <acronym>XHTML</acronym> from <acronym>HTML</acronym> input.
    627 		</para>
    628 	</listitem>
    629 		</varlistentry>
    630 
    631 	</variablelist>
    632 </refsect1>
    633 
    634 <refsect1 id="shell">
    635 	<title>SHELL COMMANDS</title>
    636 	<para>
    637 		&xmllint; offers an interactive shell mode invoked with
    638 		the <option>--shell</option> command. Available commands in shell mode
    639 		include (in alphabetical order):
    640 	</para>
    641 	<variablelist>
    642 
    643 		<varlistentry>
    644 	<term><command>base</command></term>
    645 	<listitem>
    646 		<para>Display <acronym>XML</acronym> base of the node.</para>
    647 	</listitem>
    648 		</varlistentry>
    649 
    650 		<varlistentry>
    651 	<term><command>bye</command></term>
    652 	<listitem>
    653 		<para>Leave the shell.</para>
    654 	</listitem>
    655 		</varlistentry>
    656 
    657 		<varlistentry>
    658 	<term><command>cat <replaceable>NODE</replaceable></command></term>
    659 	<listitem>
    660 		<para>Display the given node or the current one.</para>
    661 	</listitem>
    662 		</varlistentry>
    663 
    664 		<varlistentry>
    665 	<term><command>cd <replaceable>PATH</replaceable></command></term>
    666 	<listitem>
    667 		<para>
    668 			Change the current node to the given path (if unique) or root if no
    669 			argument is given.
    670 		</para>
    671 	</listitem>
    672 		</varlistentry>
    673 
    674 		<varlistentry>
    675 	<term><command>dir <replaceable>PATH</replaceable></command></term>
    676 	<listitem>
    677 		<para>
    678 			Dumps information about the node (namespace, attributes, content).
    679 		</para>
    680 	</listitem>
    681 		</varlistentry>
    682 
    683 		<varlistentry>
    684 	<term><command>du <replaceable>PATH</replaceable></command></term>
    685 	<listitem>
    686 		<para>
    687 			Show the structure of the subtree under the given path or the current node.
    688 		</para>
    689 	</listitem>
    690 		</varlistentry>
    691 
    692 		<varlistentry>
    693 	<term><command>exit</command></term>
    694 	<listitem>
    695 		<para>Leave the shell.</para>
    696 	</listitem>
    697 		</varlistentry>
    698 
    699 		<varlistentry>
    700 	<term><command>help</command></term>
    701 	<listitem>
    702 		<para>Show this help.</para>
    703 	</listitem>
    704 		</varlistentry>
    705 
    706 		<varlistentry>
    707 	<term><command>free</command></term>
    708 	<listitem>
    709 		<para>Display memory usage.</para>
    710 	</listitem>
    711 		</varlistentry>
    712 
    713 		<varlistentry>
    714 	<term><command>load <replaceable>FILENAME</replaceable></command></term>
    715 	<listitem>
    716 		<para>Load a new document with the given filename.</para>
    717 	</listitem>
    718 		</varlistentry>
    719 
    720 		<varlistentry>
    721 	<term><command>ls <replaceable>PATH</replaceable></command></term>
    722 	<listitem>
    723 		<para>List contents of the given path or the current directory.</para>
    724 	</listitem>
    725 		</varlistentry>
    726 
    727 		<varlistentry>
    728 	<term><command>pwd</command></term>
    729 	<listitem>
    730 		<para>Display the path to the current node.</para>
    731 	</listitem>
    732 		</varlistentry>
    733 
    734 		<varlistentry>
    735 	<term><command>quit</command></term>
    736 	<listitem>
    737 		<para>Leave the shell.</para>
    738 	</listitem>
    739 		</varlistentry>
    740 
    741 		<varlistentry>
    742 	<term><command>save <replaceable>FILENAME</replaceable></command></term>
    743 	<listitem>
    744 		<para>
    745 			Save the current document to the given filename or to the original name.
    746 		</para>
    747 	</listitem>
    748 		</varlistentry>
    749 
    750 		<varlistentry>
    751 	<term><option>validate</option></term>
    752 	<listitem>
    753 		<para>Check the document for errors.</para>
    754 	</listitem>
    755 		</varlistentry>
    756 
    757 		<varlistentry>
    758 	<term><command>write <replaceable>FILENAME</replaceable></command></term>
    759 	<listitem>
    760 		<para>Write the current node to the given filename.</para>
    761 	</listitem>
    762 		</varlistentry>
    763 
    764 	</variablelist>
    765 </refsect1>
    766 
    767 <refsect1 id="environment">
    768 	<title>ENVIRONMENT</title>
    769 	<variablelist>
    770 
    771 		<varlistentry>
    772 	<term><envar>SGML_CATALOG_FILES</envar></term>
    773 	<listitem>
    774 		<para><acronym>SGML</acronym> catalog behavior can be changed by redirecting
    775 			queries to the user's own set of catalogs. This can be done by setting
    776 			the <envar>SGML_CATALOG_FILES</envar> environment variable to a list
    777 			of catalogs. An empty one should deactivate loading the
    778 			default <filename>/etc/sgml/catalog</filename> catalog.
    779 		</para>
    780 	</listitem>
    781 		</varlistentry>
    782 
    783 		<varlistentry>
    784 	<term><envar>XML_CATALOG_FILES</envar></term>
    785 	<listitem>
    786 		<para><acronym>XML</acronym> catalog behavior can be changed by redirecting
    787 			queries to the user's own set of catalogs. This can be done by setting
    788 			the <envar>XML_CATALOG_FILES</envar> environment variable to a list
    789 			of catalogs. An empty one should deactivate loading the
    790 			default <filename>/etc/xml/catalog</filename> catalog.
    791 		</para>
    792 	</listitem>
    793 		</varlistentry>
    794 
    795 		<varlistentry>
    796 	<term><envar>XML_DEBUG_CATALOG</envar></term>
    797 	<listitem>
    798 		<para>Setting the environment variable <envar>XML_DEBUG_CATALOG</envar>
    799 			to <parameter>non-zero</parameter> using the <command>export</command>
    800 			command outputs debugging information related to catalog operations.
    801 		</para>
    802 	</listitem>
    803 		</varlistentry>
    804 
    805 		<varlistentry>
    806 	<term><envar>XMLLINT_INDENT</envar></term>
    807 	<listitem>
    808 		<para>Setting the environment variable <envar>XMLLINT_INDENT</envar>
    809 			controls the indentation. The default value is two spaces &quot;  &quot;.
    810 		</para>
    811 	</listitem>
    812 		</varlistentry>
    813 		
    814 	</variablelist>
    815 </refsect1>
    816 
    817 <refsect1 id="diagnostics">
    818 	<title>DIAGNOSTICS</title>
    819 	<para>
    820 		&xmllint; return codes provide information that can be used when
    821 		calling it from scripts.
    822 	</para>
    823 	<!-- better use segmentedlist element later,
    824 	     which is currently only supported in snapshots -->
    825 	<variablelist>
    826 
    827 		<varlistentry>
    828 	<term><errorcode>0</errorcode></term>
    829 	<listitem>
    830 		<para>No error</para>
    831 	</listitem>
    832 		</varlistentry>
    833 
    834 		<varlistentry>
    835 	<term><errorcode>1</errorcode></term>
    836 	<listitem>
    837 		<para>Unclassified</para>
    838 	</listitem>
    839 		</varlistentry>
    840 
    841 		<varlistentry>
    842 	<term><errorcode>2</errorcode></term>
    843 	<listitem>
    844 		<para>Error in <acronym>DTD</acronym></para>
    845 	</listitem>
    846 		</varlistentry>
    847 
    848 		<varlistentry>
    849 	<term><errorcode>3</errorcode></term>
    850 	<listitem>
    851 		<para>Validation error</para>
    852 	</listitem>
    853 		</varlistentry>
    854 
    855 		<varlistentry>
    856 	<term><errorcode>4</errorcode></term>
    857 	<listitem>
    858 		<para>Validation error</para>
    859 	</listitem>
    860 		</varlistentry>
    861 
    862 		<varlistentry>
    863 	<term><errorcode>5</errorcode></term>
    864 	<listitem>
    865 		<para>Error in schema compilation</para>
    866 	</listitem>
    867 		</varlistentry>
    868 
    869 		<varlistentry>
    870 	<term><errorcode>6</errorcode></term>
    871 	<listitem>
    872 		<para>Error writing output</para>
    873 	</listitem>
    874 		</varlistentry>
    875 
    876 		<varlistentry>
    877 	<term><errorcode>7</errorcode></term>
    878 	<listitem>
    879 		<para>
    880 			Error in pattern (generated when <option>--pattern</option> option is used)
    881 		</para>
    882 	</listitem>
    883 		</varlistentry>
    884 
    885 		<varlistentry>
    886 	<term><errorcode>8</errorcode></term>
    887 	<listitem>
    888 		<para>
    889 			Error in Reader registration (generated
    890 			when <option>--chkregister</option> option is used)
    891 		</para>
    892 	</listitem>
    893 		</varlistentry>
    894 
    895 		<varlistentry>
    896 	<term><errorcode>9</errorcode></term>
    897 	<listitem>
    898 		<para>Out of memory error</para>
    899 	</listitem>
    900 		</varlistentry>
    901 
    902 	</variablelist>
    903 </refsect1>
    904 
    905 <refsect1 id="seealso">
    906 	<title>SEE ALSO</title>
    907 	<para><citerefentry>
    908 			<refentrytitle>libxml</refentrytitle>
    909 			<manvolnum>3</manvolnum>
    910 		</citerefentry>
    911 	</para>
    912 	<para>
    913 		More information can be found at
    914 		<itemizedlist>
    915 			<listitem>
    916 				<para><citerefentry>
    917 						<refentrytitle>libxml</refentrytitle>
    918 						<manvolnum>3</manvolnum>
    919 					</citerefentry> web page <ulink url="http://www.xmlsoft.org/"/>
    920 				</para>
    921 			</listitem>
    922 			<listitem>
    923 				<para>W3C <acronym>XSLT</acronym> page <ulink url="http://www.w3.org/TR/xslt"/>
    924 				</para>
    925 			</listitem>
    926 		</itemizedlist>
    927 	</para>
    928 </refsect1>
    929 
    930 </refentry>
    931