2001-10-27 20:14:01 +00:00
|
|
|
<?xml version="1.0"?>
|
2003-04-25 13:22:10 +00:00
|
|
|
<?xml-stylesheet type="text/xsl"
|
|
|
|
href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
|
2001-10-27 20:14:01 +00:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
2006-02-19 21:35:39 +00:00
|
|
|
|
|
|
|
<!ENTITY xmllint "<command>xmllint</command>">
|
2001-10-27 20:14:01 +00:00
|
|
|
]>
|
|
|
|
<refentry>
|
|
|
|
<refentryinfo>
|
|
|
|
<title>xmllint Manual</title>
|
|
|
|
<copyright>
|
|
|
|
<year>2001</year>
|
|
|
|
</copyright>
|
2004-02-27 03:26:30 +00:00
|
|
|
<copyright>
|
|
|
|
<year>2004</year>
|
|
|
|
</copyright>
|
2001-10-27 20:14:01 +00:00
|
|
|
<author>
|
|
|
|
<firstname>John</firstname>
|
|
|
|
<surname>Fleck</surname>
|
|
|
|
</author>
|
|
|
|
<address><email>jfleck@inkstain.net</email></address>
|
|
|
|
<author>
|
|
|
|
<firstname>Ziying</firstname>
|
|
|
|
<surname>Sherwin</surname>
|
|
|
|
</author>
|
|
|
|
<address><email>sherwin@nlm.nih.gov</email></address>
|
2001-11-18 00:18:06 +00:00
|
|
|
<author>
|
|
|
|
<firstname>Heiko</firstname>
|
|
|
|
<surname>Rupp</surname>
|
|
|
|
</author>
|
|
|
|
<address><email>hwr@pilhuhn.de</email></address>
|
2001-12-11 04:41:24 +00:00
|
|
|
|
2004-08-15 00:47:45 +00:00
|
|
|
<releaseinfo>This is release 0.5 of the xmllint Manual.</releaseinfo>
|
2001-10-27 20:14:01 +00:00
|
|
|
</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>
|
2006-02-19 21:35:39 +00:00
|
|
|
<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>
|
|
|
|
<arg choice="plain"><option>--path "<replaceable class="option">PATHS</replaceable>"</option></arg>
|
|
|
|
<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>
|
2001-10-27 20:14:01 +00:00
|
|
|
</group>
|
2006-02-19 21:35:39 +00:00
|
|
|
<arg choice="req" rep="repeat"><replaceable>XML-FILE(S)</replaceable></arg>
|
|
|
|
</cmdsynopsis>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>xmllint</command>
|
|
|
|
<arg choice="plain"><option>--help</option></arg>
|
|
|
|
</cmdsynopsis>
|
2001-10-27 20:14:01 +00:00
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1 id="introduction">
|
2006-02-19 21:35:39 +00:00
|
|
|
<title>DESCRIPTION</title>
|
2001-10-27 20:14:01 +00:00
|
|
|
<para>
|
2006-02-19 21:35:39 +00:00
|
|
|
The &xmllint; program parses one or more XML files, specified on the
|
|
|
|
command line as <replaceable>XML-FILE</replaceable> (or the standard
|
2004-10-29 12:18:43 +00:00
|
|
|
input if the filename provided is - ). It prints various
|
2001-10-27 20:14:01 +00:00
|
|
|
types of output, depending upon the options selected. It is useful for
|
2006-02-19 21:35:39 +00:00
|
|
|
detecting errors both in <acronym>XML</acronym> code and in
|
|
|
|
the <acronym>XML</acronym> parser itself.
|
2001-10-27 20:14:01 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
It is included in <application>libxml2</application>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 id="options">
|
2006-02-19 21:35:39 +00:00
|
|
|
<title>OPTIONS</title>
|
2001-10-27 20:14:01 +00:00
|
|
|
<variablelist>
|
2006-02-19 21:35:39 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--help</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Print out a a short usage summary for &xmllint;.</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--version</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Display the version of
|
|
|
|
<application>libxml2</application> used.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--debug</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Parse a file and output an annotated tree of the
|
|
|
|
in-memory version of the document.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--shell</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2001-11-18 00:18:06 +00:00
|
|
|
Run a navigating shell. Details on available commands in shell mode
|
|
|
|
are below.
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--debugent</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Debug the entities defined in the document.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--copy</option> </term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Test the internal copy implementation.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--recover</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Output any parsable portions of an invalid
|
|
|
|
document.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--noent</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Substitute entity values for entity
|
2006-02-19 21:35:39 +00:00
|
|
|
references. By default, &xmllint; leaves entity
|
2001-10-27 20:14:01 +00:00
|
|
|
references in place.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2003-09-26 13:53:14 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--nocdata</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Substitute CDATA section by equivalent text nodes.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--nsclean</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Remove redundant namespace declarations.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--noout</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Suppress output. By default, &xmllint;
|
|
|
|
outputs the result tree.
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2004-08-31 09:37:03 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--nonet</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Do not use the Internet to fetch <acronym>DTD</acronym>s or entities.
|
2004-08-31 09:37:03 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term> <option>--path</option> "<replaceable class="option">PATHS</replaceable>"</term>
|
2004-08-31 09:37:03 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Use the list (separated by space or colon) of filesystem path
|
|
|
|
specified by <replaceable>PATHS</replaceable> to
|
|
|
|
load <acronym>DTD</acronym>s or entities .
|
2004-08-31 09:37:03 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--load-trace</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Display to stderr all the documents loaded during the processing.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--htmlout</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Output results as an <acronym>HTML</acronym>
|
2006-02-19 21:35:39 +00:00
|
|
|
file. This causes &xmllint; to output
|
2001-10-27 20:14:01 +00:00
|
|
|
the necessary <acronym>HTML</acronym> tags surrounding the result tree
|
|
|
|
output so the results can be displayed in a browser.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--nowrap </option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Do not output <acronym>HTML</acronym> doc wrapper.
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><option>--valid</option></term>
|
2001-10-27 20:14:01 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Determine if the document is a valid instance
|
2006-02-19 21:35:39 +00:00
|
|
|
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
|
2001-10-27 20:14:01 +00:00
|
|
|
document is well-formed.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--postvalid</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Validate after parsing is completed.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term> <option>--dtdvalid</option> <replaceable class="option">URL</replaceable></term>
|
2001-10-27 20:14:01 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Use the <acronym>DTD</acronym>
|
|
|
|
specified by <replaceable>URL</replaceable> for
|
2001-10-27 20:14:01 +00:00
|
|
|
validation.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2003-08-18 16:39:51 +00:00
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term> <option>--dtdvalidfpi</option> <replaceable class="option">FPI</replaceable></term>
|
2003-08-18 16:39:51 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Use the <acronym>DTD</acronym>
|
|
|
|
specified by the Public Identifier <replaceable>FPI</replaceable>
|
|
|
|
for validation, note that this
|
2003-08-18 16:39:51 +00:00
|
|
|
will require a Catalog exporting that Public Identifier to work.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--timing</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Output information about the time it takes &xmllint;
|
|
|
|
to perform the various steps.
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-08-15 00:47:45 +00:00
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><option>--output</option> <replaceable class="option">FILE</replaceable></term>
|
2004-08-15 00:47:45 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>Define a file path where xmllint will save the result of
|
|
|
|
parsing. Usually the programs build a tree and save it on stdout, with
|
2006-02-19 21:35:39 +00:00
|
|
|
this option the result <acronym>XML</acronym> instance will be saved onto
|
|
|
|
a file.</simpara>
|
2004-08-15 00:47:45 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--repeat</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Repeat 100 times, for timing or profiling.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--insert</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Test for valid insertions.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--compress</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Turn on <application>gzip</application> compression of output.
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--html</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Use the <acronym>HTML</acronym> parser.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-08-15 00:47:45 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--xmlout</option></term>
|
|
|
|
<listitem>
|
2005-07-10 19:03:16 +00:00
|
|
|
<simpara>Used in conjunction with <option>--html</option>. Usually
|
2006-02-19 21:35:39 +00:00
|
|
|
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.</simpara>
|
2004-08-15 00:47:45 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--push</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Use the push mode of the parser.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--memory</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Parse from memory.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-08-15 00:47:45 +00:00
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><option>--maxmem</option> <replaceable class="option">NNBYTES</replaceable></term>
|
2004-08-15 00:47:45 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>Test the parser memory
|
2006-02-19 21:35:39 +00:00
|
|
|
support. <replaceable>NNBYTES</replaceable> is the maximum number of bytes the
|
2004-08-15 00:47:45 +00:00
|
|
|
library is allowed to allocate. This can also be used to make sure batch
|
2006-02-19 21:35:39 +00:00
|
|
|
processing of <acronym>XML</acronym> files will not exhaust the virtual memory
|
|
|
|
of the server running them.</simpara>
|
2004-08-15 00:47:45 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--nowarning</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Do not emit warnings from the parser and/or validator.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--noblanks</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Drop ignorable blank spaces.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--format</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Reformat and reindent the output. The <envar>XMLLINT_INDENT</envar>
|
2003-03-09 22:36:52 +00:00
|
|
|
environment variable controls the indentation (default
|
2003-04-25 10:39:38 +00:00
|
|
|
value is two spaces " ").
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--testIO</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Test user input/output support.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><option>--encode</option> <replaceable class="option">ENCODING</replaceable></term>
|
2001-10-27 20:14:01 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Output in the given encoding.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--catalogs</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Use the catalogs from <envar>SGML_CATALOG_FILES</envar>.
|
|
|
|
Otherwise <filename>/etc/xml/catalog</filename>
|
2001-10-27 20:14:01 +00:00
|
|
|
is used by default.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--nocatalogs</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Do not use any catalogs.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--auto</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Generate a small document for testing purposes.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--xinclude</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Do XInclude processing.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-08-16 12:34:50 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--noxincludenode</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Do XInclude processing but do not generate XInclude start and end
|
|
|
|
nodes.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2001-10-27 20:14:01 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--loaddtd</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Fetch external <acronym>DTD</acronym>.
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--dtdattr</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Fetch external <acronym>DTD</acronym> and populate the tree with
|
|
|
|
inherited attributes.
|
2001-10-27 20:14:01 +00:00
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2001-12-14 04:24:50 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--dropdtd</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Remove <acronym>DTD</acronym> from output.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2003-01-07 03:54:25 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--stream</option></term>
|
|
|
|
<listitem>
|
2003-04-20 16:45:07 +00:00
|
|
|
<simpara>Use streaming API - useful when used in combination with
|
2006-02-19 21:35:39 +00:00
|
|
|
<option>--relaxng</option> or <option>--valid</option> options
|
|
|
|
for validation of files that are
|
2003-04-20 16:45:07 +00:00
|
|
|
too large to be held in memory.</simpara>
|
2003-01-07 03:54:25 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-08-15 00:47:45 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--walker</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Test the walker module, which is a reader interface but for a
|
2006-02-19 21:35:39 +00:00
|
|
|
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.</simpara>
|
2004-08-15 00:47:45 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2003-01-07 03:54:25 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--chkregister</option></term>
|
|
|
|
<listitem>
|
2004-08-14 11:15:13 +00:00
|
|
|
<simpara>Turn on node registration. Useful for developers testing
|
2006-02-19 21:35:39 +00:00
|
|
|
<application>libxml2</application> node tracking code.</simpara>
|
2003-01-07 03:54:25 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-08-15 00:47:45 +00:00
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><option>--pattern</option> <replaceable class="option">PATTERNVALUE</replaceable></term>
|
2004-08-15 00:47:45 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>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.</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2003-03-25 14:05:17 +00:00
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><option>--relaxng</option> <replaceable class="option">SCHEMA</replaceable></term>
|
2003-03-25 14:05:17 +00:00
|
|
|
<listitem>
|
2006-02-19 21:35:39 +00:00
|
|
|
<simpara>Use RelaxNG file named <replaceable class="option">SCHEMA</replaceable> for
|
2003-03-25 14:05:17 +00:00
|
|
|
validation.</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2003-05-13 22:14:13 +00:00
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><option>--schema</option> <replaceable>SCHEMA</replaceable></term>
|
2003-05-13 22:14:13 +00:00
|
|
|
<listitem>
|
2006-02-19 21:35:39 +00:00
|
|
|
<simpara>Use a W3C XML Schema file named <replaceable>SCHEMA</replaceable>
|
|
|
|
for validation.</simpara>
|
2003-05-13 22:14:13 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2004-08-16 00:39:03 +00:00
|
|
|
<option>--c14n</option></term>
|
2003-05-13 22:14:13 +00:00
|
|
|
<listitem>
|
2004-08-16 00:39:03 +00:00
|
|
|
<simpara>Use the W3C XML Canonicalisation (C14N) to
|
2004-08-19 13:45:47 +00:00
|
|
|
serialize the result of parsing to stdout. It keeps comments in
|
|
|
|
the result.</simpara>
|
2003-05-13 22:14:13 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2001-10-27 20:14:01 +00:00
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2001-11-18 00:18:06 +00:00
|
|
|
|
|
|
|
<refsect1 id="shell">
|
2006-02-19 21:35:39 +00:00
|
|
|
<title>SHELL COMMANDS</title>
|
2001-11-18 00:18:06 +00:00
|
|
|
<para>
|
2006-02-19 21:35:39 +00:00
|
|
|
&xmllint; offers an interactive shell mode
|
2001-11-18 00:18:06 +00:00
|
|
|
invoked with the <option>--shell</option> command. Available commands in
|
|
|
|
shell mode include:
|
|
|
|
</para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>base</command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
display XML base of the node
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>bye</command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
leave shell
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>cat <replaceable>NODE</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Display node if given or current node.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>cd <replaceable>PATH</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Change the current node to <replaceable>PATH</replaceable> (if given
|
2001-11-18 00:18:06 +00:00
|
|
|
and unique) or root if no argument given.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>dir <replaceable>PATH</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Dumps information about the node (namespace, attributes, content).
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>du <replaceable>PATH</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Show the structure of the subtree under path or the current node.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>exit</command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Leave the shell.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>help</command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Show this help.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>free</command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Display memory usage.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>load <replaceable>FILENAME</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Load a new document with the given name.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>ls <replaceable>PATH</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
List contents of <replaceable>PATH</replaceable> (if given) or the
|
2001-11-18 00:18:06 +00:00
|
|
|
current directory.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>pwd</command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Display the path to the current node.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>quit</command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Leave the shell.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>save <replaceable>FILENAME</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
2006-02-19 21:35:39 +00:00
|
|
|
Saves the current document to <replaceable>FILENAME</replaceable> if
|
2001-11-18 00:18:06 +00:00
|
|
|
given or to the original name.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>validate</option></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Check the document for error.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><command>write <replaceable>FILENAME</replaceable></command></term>
|
2001-11-18 00:18:06 +00:00
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
Write the current node to the given filename.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2001-12-14 04:24:50 +00:00
|
|
|
|
2001-11-18 00:18:06 +00:00
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2002-12-26 02:23:24 +00:00
|
|
|
<refsect1>
|
2006-02-19 21:35:39 +00:00
|
|
|
<title>ENVIRONMENT</title>
|
|
|
|
<para>On the completion of execution, &xmllint;
|
2004-06-20 00:36:06 +00:00
|
|
|
returns the following error codes:</para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><envar>SGML_CATALOG_FILES</envar></term>
|
2004-06-20 00:36:06 +00:00
|
|
|
<listitem>
|
2006-02-19 21:35:39 +00:00
|
|
|
<simpara>...</simpara>
|
2004-06-20 00:36:06 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><envar>XML_CATALOG_FILES</envar></term>
|
2004-06-20 00:36:06 +00:00
|
|
|
<listitem>
|
2006-02-19 21:35:39 +00:00
|
|
|
<simpara>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.</simpara>
|
2004-06-20 00:36:06 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><envar>XML_DEBUG_CATALOG</envar></term>
|
2004-06-20 00:36:06 +00:00
|
|
|
<listitem>
|
2006-02-19 21:35:39 +00:00
|
|
|
<simpara>Setting the environment variable <envar>XML_DEBUG_CATALOG</envar>
|
|
|
|
using the command <command>"export XML_DEBUG_CATALOG="</command>
|
|
|
|
outputs debugging information related to catalog operations.</simpara>
|
2004-06-20 00:36:06 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><envar>XMLLINT_INDENT</envar></term>
|
2004-06-20 00:36:06 +00:00
|
|
|
<listitem>
|
2006-02-19 21:35:39 +00:00
|
|
|
<simpara>...</simpara>
|
2004-06-20 00:36:06 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
|
|
<title>DIAGNOSTICS</title>
|
|
|
|
<para>On the completion of execution, &xmllint;
|
|
|
|
returns the following error codes:</para>
|
|
|
|
<variablelist>
|
2004-06-20 00:36:06 +00:00
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><errorcode>0</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>No error</simpara>
|
|
|
|
</listitem>
|
2004-06-20 00:36:06 +00:00
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><errorcode>1</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Unclassified</simpara>
|
|
|
|
</listitem>
|
2004-06-20 00:36:06 +00:00
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><errorcode>2</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Error in <acronym>DTD</acronym></simpara>
|
|
|
|
</listitem>
|
2004-06-20 00:36:06 +00:00
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><errorcode>3</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Validation error</simpara>
|
|
|
|
</listitem>
|
2004-06-20 00:36:06 +00:00
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><errorcode>4</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Validation error</simpara>
|
|
|
|
</listitem>
|
2004-06-20 00:36:06 +00:00
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2006-02-19 21:35:39 +00:00
|
|
|
<term><errorcode>5</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Error in schema compilation</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><errorcode>6</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Error writing output</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><errorcode>7</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Error in pattern (generated when <option>--pattern</option>
|
|
|
|
option is used)</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><errorcode>8</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Error in Reader registration (generated
|
|
|
|
when <option>--chkregister</option> option is used)</simpara>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><errorcode>9</errorcode></term>
|
|
|
|
<listitem>
|
|
|
|
<simpara>Out of memory error</simpara>
|
|
|
|
</listitem>
|
2004-06-20 00:36:06 +00:00
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2001-11-18 00:18:06 +00:00
|
|
|
</refentry>
|