mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
Add Makefile rules to rebuild HTML man pages
This should make sure that the online version of the man pages for xmllint and xmlcatalog stay up to date. Also rebuild both HTML documents.
This commit is contained in:
@@ -243,7 +243,7 @@ docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
|
|||||||
|
|
||||||
api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl
|
api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl
|
||||||
|
|
||||||
web: $(PAGES)
|
web: $(PAGES) xmllint.html xmlcatalog_man.html
|
||||||
|
|
||||||
../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
|
../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
|
||||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||||
@@ -314,9 +314,15 @@ libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.x
|
|||||||
xmllint.1: xmllint.xml
|
xmllint.1: xmllint.xml
|
||||||
-@($(XSLTPROC) --nonet xmllint.xml)
|
-@($(XSLTPROC) --nonet xmllint.xml)
|
||||||
|
|
||||||
|
xmllint.html: xmllint.xml
|
||||||
|
-@($(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl xmllint.xml)
|
||||||
|
|
||||||
xmlcatalog.1: xmlcatalog_man.xml
|
xmlcatalog.1: xmlcatalog_man.xml
|
||||||
-@($(XSLTPROC) --nonet xmlcatalog_man.xml)
|
-@($(XSLTPROC) --nonet xmlcatalog_man.xml)
|
||||||
|
|
||||||
|
xmlcatalog_man.html: xmlcatalog_man.xml
|
||||||
|
-@($(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl xmlcatalog_man.xml)
|
||||||
|
|
||||||
check-extra-dist:
|
check-extra-dist:
|
||||||
for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc
|
for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc
|
||||||
for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST
|
for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST
|
||||||
|
|||||||
@@ -1,101 +1,140 @@
|
|||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlcatalog</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2431614"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xmlcatalog — Command line tool to parse and manipulate <span class="acronym">XML</span> or
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlcatalog</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="idm1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xmlcatalog —
|
||||||
<span class="acronym">SGML</span> catalog files.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xmlcatalog</tt> [[--shell] | [--create] | [--add <i class="replaceable"><tt>type</tt></i>
|
Command line tool to parse and manipulate <acronym class="acronym">XML</acronym>
|
||||||
<i class="replaceable"><tt>orig</tt></i> <i class="replaceable"><tt>replace</tt></i>] | [--del <i class="replaceable"><tt>values</tt></i>] | [--noout] | [--verbose]] [<tt class="option"><i class="replaceable"><tt>catalogfile</tt></i></tt>] [<tt class="option"><i class="replaceable"><tt>entities</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
|
or <acronym class="acronym">SGML</acronym> catalog files.
|
||||||
<span class="application">xmlcatalog</span> is a command line application
|
</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xmlcatalog</code> [ <code class="option">--sgml</code> | <code class="option">--shell</code> | <code class="option">--create</code> | <code class="option">--del <em class="replaceable"><code>VALUE(S)</code></em></code> |
|
||||||
allowing users to monitor and manipulate <span class="acronym">XML</span> and
|
[
|
||||||
<span class="acronym">SGML</span> catalogs. It is included in
|
<code class="option">--add
|
||||||
<span class="application">libxml2</span>.
|
<em class="replaceable"><code>TYPE</code></em>
|
||||||
|
<em class="replaceable"><code>ORIG</code></em>
|
||||||
|
<em class="replaceable"><code>REPLACE</code></em>
|
||||||
|
</code>
|
||||||
|
| <code class="option">--add <em class="replaceable"><code>FILENAME</code></em></code> ]
|
||||||
|
| <code class="option">--noout</code> | <code class="option">--no-super-update</code> |
|
||||||
|
[ <code class="option">-v</code> | <code class="option">--verbose</code> ]
|
||||||
|
] {<em class="replaceable"><code>CATALOGFILE</code></em>} {<em class="replaceable"><code>ENTITIES</code></em>...}</p></div></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p>
|
||||||
|
<span class="command"><strong>xmlcatalog</strong></span> is a command line application allowing users to monitor and
|
||||||
|
manipulate <acronym class="acronym">XML</acronym> and <acronym class="acronym">SGML</acronym> catalogs. It
|
||||||
|
is included in <span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span>.
|
||||||
</p><p>
|
</p><p>
|
||||||
Its functions can be invoked from a single command from the command line,
|
Its functions can be invoked from a single command from the command line,
|
||||||
or it can perform multiple functions in interactive mode. It can operate
|
or it can perform multiple functions in interactive mode. It can operate
|
||||||
on both <span class="acronym">XML</span> and <span class="acronym">SGML</span> files.
|
on both <acronym class="acronym">XML</acronym> and <acronym class="acronym">SGML</acronym> files.
|
||||||
</p></div><div class="refsect1" lang="en"><a name="cloptions"></a><h2>Command Line Options</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">--shell</tt> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
|
</p></div><div class="refsect1"><a name="options"></a><h2>OPTIONS</h2><p>
|
||||||
Run a shell
|
<span class="command"><strong>xmlcatalog</strong></span> accepts the following options (in alphabetical order):
|
||||||
allowing interactive queries on catalog file
|
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
|
||||||
<i class="replaceable"><tt>filename</tt></i>.
|
<code class="option">--add
|
||||||
</dd><dt><span class="term"><tt class="option">--create</tt> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
|
<em class="replaceable"><code>TYPE</code></em>
|
||||||
Create a new
|
<em class="replaceable"><code>ORIG</code></em>
|
||||||
<span class="acronym">XML</span> catalog. Outputs to stdout, ignoring
|
<em class="replaceable"><code>REPLACE</code></em>
|
||||||
<i class="replaceable"><tt>filename</tt></i> unless <tt class="option">--noout</tt> is
|
</code>
|
||||||
used, in which case it creates a new catalog file
|
</span></dt><dd><p>
|
||||||
<i class="replaceable"><tt>filename</tt></i>.
|
Add an entry to <code class="filename">CATALOGFILE</code>. <em class="replaceable"><code>TYPE</code></em>
|
||||||
</dd><dt><span class="term"><tt class="option">--add</tt> <i class="replaceable"><tt>'type'</tt></i> <i class="replaceable"><tt>'orig'</tt></i> <i class="replaceable"><tt>'replace'</tt></i> <i class="replaceable"><tt>filename</tt></i></span></dt><dd><p>
|
indicates the type of entry. Possible types are: <span class="simplelist"><em class="parameter"><code>public</code></em>, <em class="parameter"><code>system</code></em>, <em class="parameter"><code>uri</code></em>, <em class="parameter"><code>rewriteSystem</code></em>, <em class="parameter"><code>rewriteURI</code></em>, <em class="parameter"><code>delegatePublic</code></em>, <em class="parameter"><code>delegateSystem</code></em>, <em class="parameter"><code>delegateURI</code></em>, <em class="parameter"><code>nextCatalog</code></em></span>. <em class="replaceable"><code>ORIG</code></em> is the original
|
||||||
Add an entry to catalog file
|
reference to be replaced, and <em class="replaceable"><code>REPLACE</code></em>
|
||||||
<tt class="filename">filename</tt>. <i class="replaceable"><tt>type</tt></i>
|
is the <acronym class="acronym">URI</acronym> of the replacement entity to be
|
||||||
indicates the type of entry. Possible types are 'public', 'system', 'uri',
|
used. The <code class="option">--add</code> option will not overwrite
|
||||||
'rewriteSystem', 'rewriteURI', 'delegatePublic', 'delegateSystem',
|
<code class="filename">CATALOGFILE</code>, outputting
|
||||||
'delegateURI' and 'nextCatalog'. <i class="replaceable"><tt>'orig'</tt></i> is the original
|
to <code class="filename">stdout</code>, unless
|
||||||
reference to be replaced, and <i class="replaceable"><tt>'replace'</tt></i>
|
<code class="option">--noout</code> is used. The <code class="option">--add</code> will
|
||||||
is the <span class="acronym">URI</span> of the replacement entity to be
|
always take three parameters even if some of the <acronym class="acronym">XML</acronym>
|
||||||
used. The <tt class="option">--add</tt> option will not overwrite
|
catalog constructs will have only a single argument.
|
||||||
<i class="replaceable"><tt>filename</tt></i>, outputing to stdout, unless
|
</p></dd><dt><span class="term"><code class="option">--add <em class="replaceable"><code>FILENAME</code></em></code></span></dt><dd><p>
|
||||||
<tt class="option">--noout</tt> is used. The <tt class="option">--add</tt> will
|
If the <code class="option">--add</code> option is used following
|
||||||
always take three parameters even if some of the
|
the <code class="option">--sgml</code> option, only a single argument,
|
||||||
<span class="acronym">XML</span> catalog constructs will have only a single
|
a <em class="replaceable"><code>FILENAME</code></em>, is used. This is used to add
|
||||||
argument.
|
the name of a catalog file to an <acronym class="acronym">SGML</acronym> supercatalog,
|
||||||
|
a file that contains references to other included <acronym class="acronym">SGML</acronym>
|
||||||
</p><p>
|
catalog files.
|
||||||
If the <tt class="option">--add</tt> option is used following the
|
</p></dd><dt><span class="term"><code class="option">--create</code></span></dt><dd><p>
|
||||||
<tt class="option">--sgml</tt> option, only a single argument, a
|
Create a new <acronym class="acronym">XML</acronym> catalog. Outputs
|
||||||
<i class="replaceable"><tt>filename</tt></i>, is used. This is used to add
|
to <code class="filename">stdout</code>,
|
||||||
the name of a catalog file to an <span class="acronym">SGML</span>
|
ignoring <em class="replaceable"><code>filename</code></em> unless <code class="option">--noout</code> is
|
||||||
supercatalog, a file that contains references to other included
|
used, in which case it creates a new catalog
|
||||||
<span class="acronym">SGML</span> catalog files.
|
file <em class="replaceable"><code>filename</code></em>.
|
||||||
</p></dd><dt><span class="term"><tt class="option">--del</tt> <i class="replaceable"><tt>'values'</tt></i> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--del <em class="replaceable"><code>VALUE(S)</code></em></code></span></dt><dd><p>
|
||||||
Remove entries from the catalog file
|
Remove entries from <em class="replaceable"><code>CATALOGFILE</code></em>
|
||||||
<i class="replaceable"><tt>filename</tt></i> matching
|
matching <em class="replaceable"><code>VALUE(S)</code></em>. The <code class="option">--del</code>
|
||||||
<i class="replaceable"><tt>'values'</tt></i>. The <tt class="option">--del</tt> option
|
option will not overwrite <em class="replaceable"><code>CATALOGFILE</code></em>,
|
||||||
will not overwrite <i class="replaceable"><tt>filename</tt></i>, outputing to
|
outputting to <code class="filename">stdout</code>,
|
||||||
stdout, unless <tt class="option">--noout</tt> is used.
|
unless <code class="option">--noout</code> is used.
|
||||||
</dd><dt><span class="term"><tt class="option">--noout</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--noout</code></span></dt><dd><p>
|
||||||
Save output to the named file rather than
|
Save output to the named file rather than outputting
|
||||||
outputing to stdout.
|
to <code class="filename">stdout</code>.
|
||||||
</dd><dt><span class="term"><tt class="option">--sgml</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--no-super-update</code></span></dt><dd><p>
|
||||||
Uses SGML Super catalogs for --add and --del options
|
Do not update the <acronym class="acronym">SGML</acronym> super catalog.
|
||||||
</dd><dt><span class="term"><tt class="option">-v</tt> or <tt class="option">--verbose</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--shell</code></span></dt><dd><p>
|
||||||
output debugging
|
Run a shell allowing interactive queries on catalog
|
||||||
information.
|
file <em class="replaceable"><code>CATALOGFILE</code></em>. For the set of available
|
||||||
</dd></dl></div></div><div class="refsect1" lang="en"><a name="shell"></a><h2>Shell Commands</h2><p>Invoking <span class="application">xmlcatalog</span> with the
|
commands see <a class="xref" href="#shell" title="SHELL COMMANDS">the section called “SHELL COMMANDS”</a>.
|
||||||
<tt class="option">--shell</tt> <i class="replaceable"><tt>filename</tt></i> option opens
|
</p></dd><dt><span class="term"><code class="option">--sgml</code></span></dt><dd><p>
|
||||||
|
Uses <acronym class="acronym">SGML</acronym> super catalogs for <code class="option">--add</code>
|
||||||
|
and <code class="option">--del</code> options.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">-v</code>, </span><span class="term"><code class="option">--verbose</code></span></dt><dd><p>Output debugging information.</p></dd></dl></div><p>
|
||||||
|
Invoking <span class="command"><strong>xmlcatalog</strong></span> non-interactively without a designated action
|
||||||
|
(imposed with options like <code class="option">--add</code>) will result in a lookup
|
||||||
|
of the catalog entry for <em class="replaceable"><code>ENTITIES</code></em> in the
|
||||||
|
catalog denoted with <em class="replaceable"><code>CATALOGFILE</code></em>. The
|
||||||
|
corresponding entries will be output to the command line. This mode of
|
||||||
|
operation, together with <code class="option">--shell</code> mode and non-modifying
|
||||||
|
(i.e. without <code class="option">--noout</code>) direct actions, allows for
|
||||||
|
a special shortcut of the void <em class="replaceable"><code>CATALOGFILE</code></em>
|
||||||
|
specification (possibly expressed as "" in the shell
|
||||||
|
environment) appointing the default system catalog. That simplifies the
|
||||||
|
handling when its exact location is irrelevant but the respective built-in
|
||||||
|
still needs to be consulted.
|
||||||
|
</p></div><div class="refsect1"><a name="shell"></a><h2>SHELL COMMANDS</h2><p>
|
||||||
|
Invoking <span class="command"><strong>xmlcatalog</strong></span> with
|
||||||
|
the <code class="option">--shell <em class="replaceable"><code>CATALOGFILE</code></em></code> option opens
|
||||||
a command line shell allowing interactive access to the catalog file
|
a command line shell allowing interactive access to the catalog file
|
||||||
identified by <i class="replaceable"><tt>filename</tt></i>. Invoking the shell
|
identified by <em class="replaceable"><code>CATALOGFILE</code></em>. Invoking the shell
|
||||||
provides a command line prompt after which commands can be entered.
|
provides a command line prompt after which the following commands (described in
|
||||||
</p><div class="variablelist"><dl><dt><span class="term"><tt class="option">public</tt> <i class="replaceable"><tt>'PublicID'</tt></i></span></dt><dd>
|
alphabetical order) can be entered.
|
||||||
Execute a
|
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
|
||||||
public identifier lookup of the catalog entry for
|
<code class="option">add
|
||||||
<i class="replaceable"><tt>'PublicID'</tt></i>. The corresponding entry will be
|
<em class="replaceable"><code>TYPE</code></em>
|
||||||
|
<em class="replaceable"><code>ORIG</code></em>
|
||||||
|
<em class="replaceable"><code>REPLACE</code></em>
|
||||||
|
</code>
|
||||||
|
</span></dt><dd><p>
|
||||||
|
Add an entry to the catalog file. <em class="replaceable"><code>TYPE</code></em>
|
||||||
|
indicates the type of entry. Possible types are: <span class="simplelist"><em class="parameter"><code>public</code></em>, <em class="parameter"><code>system</code></em>, <em class="parameter"><code>uri</code></em>, <em class="parameter"><code>rewriteSystem</code></em>, <em class="parameter"><code>rewriteURI</code></em>, <em class="parameter"><code>delegatePublic</code></em>, <em class="parameter"><code>delegateSystem</code></em>, <em class="parameter"><code>delegateURI</code></em>, <em class="parameter"><code>nextCatalog</code></em></span>. <em class="replaceable"><code>ORIG</code></em> is the original
|
||||||
|
reference to be replaced, and <em class="replaceable"><code>REPLACE</code></em>
|
||||||
|
is the <acronym class="acronym">URI</acronym> of the replacement entity to be
|
||||||
|
used. The <code class="option">--add</code> option will not overwrite
|
||||||
|
<code class="filename">CATALOGFILE</code>, outputting
|
||||||
|
to <code class="filename">stdout</code>, unless
|
||||||
|
<code class="option">--noout</code> is used. The <code class="option">--add</code> will
|
||||||
|
always take three parameters even if some of the <acronym class="acronym">XML</acronym>
|
||||||
|
catalog constructs will have only a single argument.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">debug</code></span></dt><dd><p>
|
||||||
|
Print debugging statements showing the steps <span class="command"><strong>xmlcatalog</strong></span> is executing.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">del <em class="replaceable"><code>VALUE(S)</code></em></code></span></dt><dd><p>
|
||||||
|
Remove the catalog entry corresponding to <em class="replaceable"><code>VALUE(S)</code></em>.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">dump</code></span></dt><dd><p>Print the current catalog.</p></dd><dt><span class="term"><code class="option">exit</code></span></dt><dd><p>Quit the shell.</p></dd><dt><span class="term"><code class="option">public <em class="replaceable"><code>PUBLIC-ID</code></em></code></span></dt><dd><p>
|
||||||
|
Execute a Formal Public Identifier lookup of the catalog entry
|
||||||
|
for <em class="replaceable"><code>PUBLIC-ID</code></em>. The corresponding entry will be
|
||||||
output to the command line.
|
output to the command line.
|
||||||
</dd><dt><span class="term"><tt class="option">system</tt> <i class="replaceable"><tt>'SystemID'</tt></i></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">quiet</code></span></dt><dd><p>Stop printing debugging statements.</p></dd><dt><span class="term"><code class="option">system <em class="replaceable"><code>SYSTEM-ID</code></em></code></span></dt><dd><p>
|
||||||
Execute a
|
Execute a Formal Public Identifier lookup of the catalog entry
|
||||||
public identifier lookup of the catalog entry for
|
for <em class="replaceable"><code>SYSTEM-ID</code></em>. The corresponding entry will be
|
||||||
<i class="replaceable"><tt>'SystemID'</tt></i>. The corresponding entry will be
|
|
||||||
output to the command line.
|
output to the command line.
|
||||||
</dd><dt><span class="term"><tt class="option">add </tt> <i class="replaceable"><tt>'type'</tt></i> <i class="replaceable"><tt>'orig'</tt></i> <i class="replaceable"><tt>'replace'</tt></i></span></dt><dd>
|
</p></dd></dl></div></div><div class="refsect1"><a name="environment"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">XML_CATALOG_FILES</code></span></dt><dd><p><acronym class="acronym">XML</acronym> catalog behavior can be changed by redirecting
|
||||||
Add an entry to the catalog
|
queries to the user's own set of catalogs. This can be done by setting
|
||||||
file. <i class="replaceable"><tt>type</tt></i> indicates the type of
|
the <code class="envar">XML_CATALOG_FILES</code> environment variable to a list
|
||||||
entry. Possible types are 'public', 'system', 'uri', 'rewriteSystem', 'rewriteURI',
|
of catalogs. An empty one should deactivate loading the
|
||||||
'delegatePublic', 'delegateSystem', 'delegateURI' and 'nextCatalog'. <i class="replaceable"><tt>'orig'</tt></i>
|
default <code class="filename">/etc/xml/catalog</code> catalog.
|
||||||
is the original reference to be replaced, and
|
</p></dd></dl></div></div><div class="refsect1"><a name="diagnostics"></a><h2>DIAGNOSTICS</h2><p>
|
||||||
<i class="replaceable"><tt>'replace'</tt></i> is the <span class="acronym">URI</span> of the
|
<span class="command"><strong>xmlcatalog</strong></span> return codes provide information that can be used when
|
||||||
replacement entity to be used.
|
calling it from scripts.
|
||||||
</dd><dt><span class="term"><tt class="option">del</tt> <i class="replaceable"><tt>'values'</tt></i></span></dt><dd>
|
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">0</span></span></dt><dd><p>No error</p></dd><dt><span class="term"><span class="errorcode">1</span></span></dt><dd><p>Failed to remove an entry from the catalog</p></dd><dt><span class="term"><span class="errorcode">2</span></span></dt><dd><p>Failed to save to the catalog, check file permissions</p></dd><dt><span class="term"><span class="errorcode">3</span></span></dt><dd><p>Failed to add an entry to the catalog</p></dd><dt><span class="term"><span class="errorcode">4</span></span></dt><dd><p>Failed to look up an entry in the catalog</p></dd></dl></div></div><div class="refsect1"><a name="seealso"></a><h2>SEE ALSO</h2><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span>
|
||||||
Remove the
|
</p><p>
|
||||||
catalog entry corresponding to <i class="replaceable"><tt>'values'</tt></i>.
|
More information can be found at
|
||||||
</dd><dt><span class="term"><tt class="option">dump</tt></span></dt><dd>
|
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span> web page <a class="ulink" href="http://www.xmlsoft.org/" target="_top">http://www.xmlsoft.org/</a>
|
||||||
Print the current catalog.
|
</p></li><li class="listitem"><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span> catalog support web page
|
||||||
</dd><dt><span class="term"><tt class="option">debug</tt></span></dt><dd>
|
at <a class="ulink" href="http://www.xmlsoft.org/catalog.html" target="_top">http://www.xmlsoft.org/catalog.html</a>
|
||||||
Print debugging statements showing the steps
|
</p></li><li class="listitem"><p>James Clark's <acronym class="acronym">SGML</acronym> catalog
|
||||||
<span class="application">xmlcatalog</span> is executing.
|
page <a class="ulink" href="http://www.jclark.com/sp/catalog.htm" target="_top">http://www.jclark.com/sp/catalog.htm</a>
|
||||||
</dd><dt><span class="term"><tt class="option">quiet</tt></span></dt><dd>
|
</p></li><li class="listitem"><p><acronym class="acronym">OASIS</acronym> <acronym class="acronym">XML</acronym> catalog specification
|
||||||
Stop printing debugging statements.
|
<a class="ulink" href="http://www.oasis-open.org/committees/entity/spec.html" target="_top">http://www.oasis-open.org/committees/entity/spec.html</a>
|
||||||
</dd><dt><span class="term"><tt class="option">exit</tt></span></dt><dd>
|
</p></li></ul></div><p>
|
||||||
Quit the shell.
|
</p></div></div></body></html>
|
||||||
</dd></dl></div></div><div class="refsect1" lang="en"><a name="return"></a><h2>Return values</h2><p><span class="application">xmlcatalog</span>'s return codes provide
|
|
||||||
information that can be used when calling it from scripts.</p><p>0: normal</p><p>1: Failed to remove an entry from the catalog</p><p>2: Failed to save to the catalog, check file permissions</p><p>3: Failed to add an entry to the catalog</p><p>4: Failed to lookup and entry in the catalog</p></div><div class="refsect1" lang="en"><h2>Catalogs</h2><p>Catalog behavior can be changed by redirecting
|
|
||||||
queries to the user's own set of catalogs. This can be done by setting the
|
|
||||||
<tt class="varname">XML_CATALOG_FILES</tt> environment variable to a list of
|
|
||||||
catalogs. An empty one should deactivate loading the default
|
|
||||||
<tt class="filename">/etc/xml/catalog</tt> default catalog.</p></div><div class="refsect1" lang="en"><h2>References</h2><p><a href="http://www.xmlsoft.org/" target="_top">libxml web page</a></p><p><a href="http://www.xmlsoft.org/catalog.html" target="_top"><span class="application">libxml</span>
|
|
||||||
catalog support web page:</a></p><p><a href="http://www.jclark.com/sp/catalog.htm" target="_top">James Clark's
|
|
||||||
<span class="acronym">SGML</span> catalog page:</a></p><p><a href="http://www.oasis-open.org/committees/entity/spec.html" target="_top"><span class="acronym">OASIS</span>
|
|
||||||
<span class="acronym">XML</span> catalog specification: </a></p></div></div></body></html>
|
|
||||||
|
|||||||
327
doc/xmllint.html
327
doc/xmllint.html
@@ -1,175 +1,162 @@
|
|||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmllint</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2876302"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xmllint — command line <span class="acronym">XML</span> tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xmllint</tt> [[--version] | [--debug] | [--shell] | [--debugent] | [--copy] | [--recover] | [--noent] | [--noout] | [--nonet] | [--htmlout] | [--nowrap] | [--valid] | [--postvalid] | [--dtdvalid <i class="replaceable"><tt>URL</tt></i>] | [--dtdvalidfpi <i class="replaceable"><tt>FPI</tt></i>] | [--timing] | [--output <i class="replaceable"><tt>file</tt></i>] | [--repeat] | [--insert] | [--compress] | [--html] | [--xmlout] | [--push] | [--memory] | [--maxmem <i class="replaceable"><tt>nbbytes</tt></i>] | [--nowarning] | [--noblanks] | [--nocdata] | [--format] | [--encode <i class="replaceable"><tt>encoding</tt></i>] | [--dropdtd] | [--nsclean] | [--testIO] | [--catalogs] | [--nocatalogs] | [--auto] | [--xinclude] | [--noxincludenode] | [--loaddtd] | [--dtdattr] | [--stream] | [--walker] | [--pattern <i class="replaceable"><tt>patternvalue</tt></i>] | [--chkregister] | [--relaxng] | [--schema] | [--c14n]] [<tt class="option"><i class="replaceable"><tt>xmlfile</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmllint</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="idm1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xmllint — command line <acronym class="acronym">XML</acronym> tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xmllint</code> [ <code class="option">--version</code> | <code class="option">--debug</code> | <code class="option">--shell</code> | <code class="option">--xpath "<em class="replaceable"><code>XPath_expression</code></em>"</code> | <code class="option">--debugent</code> | <code class="option">--copy</code> | <code class="option">--recover</code> | <code class="option">--noent</code> | <code class="option">--noout</code> | <code class="option">--nonet</code> | <code class="option">--path "<em class="replaceable"><code>PATH(S)</code></em>"</code> | <code class="option">--load-trace</code> | <code class="option">--htmlout</code> | <code class="option">--nowrap</code> | <code class="option">--valid</code> | <code class="option">--postvalid</code> | <code class="option">--dtdvalid <em class="replaceable"><code>URL</code></em></code> | <code class="option">--dtdvalidfpi <em class="replaceable"><code>FPI</code></em></code> | <code class="option">--timing</code> | <code class="option">--output <em class="replaceable"><code>FILE</code></em></code> | <code class="option">--repeat</code> | <code class="option">--insert</code> | <code class="option">--compress</code> | <code class="option">--html</code> | <code class="option">--xmlout</code> | <code class="option">--push</code> | <code class="option">--memory</code> | <code class="option">--maxmem <em class="replaceable"><code>NBBYTES</code></em></code> | <code class="option">--nowarning</code> | <code class="option">--noblanks</code> | <code class="option">--nocdata</code> | <code class="option">--format</code> | <code class="option">--encode <em class="replaceable"><code>ENCODING</code></em></code> | <code class="option">--dropdtd</code> | <code class="option">--nsclean</code> | <code class="option">--testIO</code> | <code class="option">--catalogs</code> | <code class="option">--nocatalogs</code> | <code class="option">--auto</code> | <code class="option">--xinclude</code> | <code class="option">--noxincludenode</code> | <code class="option">--loaddtd</code> | <code class="option">--dtdattr</code> | <code class="option">--stream</code> | <code class="option">--walker</code> | <code class="option">--pattern <em class="replaceable"><code>PATTERNVALUE</code></em></code> | <code class="option">--chkregister</code> | <code class="option">--relaxng <em class="replaceable"><code>SCHEMA</code></em></code> | <code class="option">--schema <em class="replaceable"><code>SCHEMA</code></em></code> | <code class="option">--c14n</code> ] { <em class="replaceable"><code>XML-FILE(S)</code></em>... | - }</p></div><div class="cmdsynopsis"><p><code class="command">xmllint</code> <code class="option">--help</code> </p></div></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p>
|
||||||
The xmllint program parses one or more XML files, specified on the
|
The <span class="command"><strong>xmllint</strong></span> program parses one or more <acronym class="acronym">XML</acronym> files,
|
||||||
command line as <i class="replaceable"><tt>xmlfile</tt></i>. It prints various
|
specified on the command line as <em class="replaceable"><code>XML-FILE</code></em>
|
||||||
types of output, depending upon the options selected. It is useful for
|
(or the standard input if the filename provided
|
||||||
detecting errors both in <span class="acronym">XML</span> code and in the
|
is <span class="bold"><strong>-</strong></span> ). It prints various types of
|
||||||
<span class="acronym">XML</span> parser itself.
|
output, depending upon the options selected. It is useful for detecting
|
||||||
</p><p>
|
errors both in <acronym class="acronym">XML</acronym> code and in
|
||||||
It is included in <span class="application">libxml2</span>.
|
the <acronym class="acronym">XML</acronym> parser itself.
|
||||||
</p></div><div class="refsect1" lang="en"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">--version</tt></span></dt><dd>
|
</p><p><span class="command"><strong>xmllint</strong></span> is included in <span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span>.</p></div><div class="refsect1"><a name="options"></a><h2>OPTIONS</h2><p>
|
||||||
Display the version of
|
<span class="command"><strong>xmllint</strong></span> accepts the following options (in alphabetical order):
|
||||||
<span class="application">libxml2</span> used.
|
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--auto</code></span></dt><dd><p>Generate a small document for testing purposes.</p></dd><dt><span class="term"><code class="option">--catalogs</code></span></dt><dd><p>
|
||||||
</dd><dt><span class="term"><tt class="option">--debug</tt></span></dt><dd>
|
Use the <acronym class="acronym">SGML</acronym> catalog(s) from <code class="envar">SGML_CATALOG_FILES</code>.
|
||||||
|
Otherwise <acronym class="acronym">XML</acronym> catalogs starting
|
||||||
|
from <code class="filename">/etc/xml/catalog</code> are used by default.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--chkregister</code></span></dt><dd><p>
|
||||||
|
Turn on node registration. Useful for developers testing <span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span> node tracking code.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--compress</code></span></dt><dd><p>
|
||||||
|
Turn on <span class="citerefentry"><span class="refentrytitle">gzip</span>(1)</span> compression of output.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--copy</code></span></dt><dd><p>Test the internal copy implementation.</p></dd><dt><span class="term"><code class="option">--c14n</code></span></dt><dd><p>
|
||||||
|
Use the W3C <acronym class="acronym">XML</acronym> Canonicalisation (<acronym class="acronym">C14N</acronym>) to
|
||||||
|
serialize the result of parsing to <code class="filename">stdout</code>.
|
||||||
|
It keeps comments in the result.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--dtdvalid <em class="replaceable"><code>URL</code></em></code></span></dt><dd><p>
|
||||||
|
Use the <acronym class="acronym">DTD</acronym> specified by
|
||||||
|
an <em class="replaceable"><code>URL</code></em> for validation.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--dtdvalidfpi <em class="replaceable"><code>FPI</code></em></code></span></dt><dd><p>
|
||||||
|
Use the <acronym class="acronym">DTD</acronym> specified by a Formal Public
|
||||||
|
Identifier <em class="replaceable"><code>FPI</code></em> for validation, note that this
|
||||||
|
will require a catalog exporting that Formal Public Identifier to work.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--debug</code></span></dt><dd><p>
|
||||||
Parse a file and output an annotated tree of the
|
Parse a file and output an annotated tree of the
|
||||||
in-memory version of the document.
|
in-memory version of the document.
|
||||||
</dd><dt><span class="term"><tt class="option">--shell</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--debugent</code></span></dt><dd><p>Debug the entities defined in the document.</p></dd><dt><span class="term"><code class="option">--dropdtd</code></span></dt><dd><p>Remove <acronym class="acronym">DTD</acronym> from output.</p></dd><dt><span class="term"><code class="option">--dtdattr</code></span></dt><dd><p>
|
||||||
|
Fetch external <acronym class="acronym">DTD</acronym> and populate the tree with
|
||||||
|
inherited attributes.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--encode <em class="replaceable"><code>ENCODING</code></em></code></span></dt><dd><p>Output in the given encoding. Note that this works for full document not fragments or result from XPath queries.</p></dd><dt><span class="term"><code class="option">--format</code></span></dt><dd><p>
|
||||||
|
Reformat and reindent the output. The <code class="envar">XMLLINT_INDENT</code>
|
||||||
|
environment variable controls the indentation. The default value is two
|
||||||
|
spaces " ").
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd><p>Print out a short usage summary for <span class="command"><strong>xmllint</strong></span>.</p></dd><dt><span class="term"><code class="option">--html</code></span></dt><dd><p>Use the <acronym class="acronym">HTML</acronym> parser.</p></dd><dt><span class="term"><code class="option">--htmlout</code></span></dt><dd><p>
|
||||||
|
Output results as an <acronym class="acronym">HTML</acronym> file. This
|
||||||
|
causes <span class="command"><strong>xmllint</strong></span> to output the necessary <acronym class="acronym">HTML</acronym>
|
||||||
|
tags surrounding the result tree output so the results can be
|
||||||
|
displayed/viewed in a browser.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--insert</code></span></dt><dd><p>Test for valid insertions.</p></dd><dt><span class="term"><code class="option">--loaddtd</code></span></dt><dd><p>Fetch an external <acronym class="acronym">DTD</acronym>.</p></dd><dt><span class="term"><code class="option">--load-trace</code></span></dt><dd><p>
|
||||||
|
Display all the documents loaded during the processing
|
||||||
|
to <code class="filename">stderr</code>.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--maxmem <em class="replaceable"><code>NNBYTES</code></em></code></span></dt><dd><p>
|
||||||
|
Test the parser memory support. <em class="replaceable"><code>NNBYTES</code></em>
|
||||||
|
is the maximum number of bytes the library is allowed to allocate.
|
||||||
|
This can also be used to make sure batch processing
|
||||||
|
of <acronym class="acronym">XML</acronym> files will not exhaust the virtual memory
|
||||||
|
of the server running them.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--memory</code></span></dt><dd><p>Parse from memory.</p></dd><dt><span class="term"><code class="option">--noblanks</code></span></dt><dd><p>Drop ignorable blank spaces.</p></dd><dt><span class="term"><code class="option">--nocatalogs</code></span></dt><dd><p>Do not use any catalogs.</p></dd><dt><span class="term"><code class="option">--nocdata</code></span></dt><dd><p>Substitute CDATA section by equivalent text nodes.</p></dd><dt><span class="term"><code class="option">--noent</code></span></dt><dd><p>
|
||||||
|
Substitute entity values for entity references. By default, <span class="command"><strong>xmllint</strong></span>
|
||||||
|
leaves entity references in place.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--nonet</code></span></dt><dd><p>
|
||||||
|
Do not use the Internet to fetch <acronym class="acronym">DTD</acronym>s or entities.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--noout</code></span></dt><dd><p>
|
||||||
|
Suppress output. By default, <span class="command"><strong>xmllint</strong></span> outputs the result tree.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--nowarning</code></span></dt><dd><p>Do not emit warnings from the parser and/or validator.</p></dd><dt><span class="term"><code class="option">--nowrap</code></span></dt><dd><p>Do not output <acronym class="acronym">HTML</acronym> doc wrapper.</p></dd><dt><span class="term"><code class="option">--noxincludenode</code></span></dt><dd><p>
|
||||||
|
Do XInclude processing but do not generate XInclude start and end nodes.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--nsclean</code></span></dt><dd><p>Remove redundant namespace declarations.</p></dd><dt><span class="term"><code class="option">--output <em class="replaceable"><code>FILE</code></em></code></span></dt><dd><p>
|
||||||
|
Define a file path where <span class="command"><strong>xmllint</strong></span> will save the result of parsing.
|
||||||
|
Usually the programs build a tree and save it
|
||||||
|
on <code class="filename">stdout</code>, with this option
|
||||||
|
the result <acronym class="acronym">XML</acronym> instance will be saved onto a file.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--path "<em class="replaceable"><code>PATH(S)</code></em>"</code></span></dt><dd><p>
|
||||||
|
Use the (space- or colon-separated) list of filesystem paths specified
|
||||||
|
by <em class="replaceable"><code>PATHS</code></em> to load <acronym class="acronym">DTD</acronym>s or
|
||||||
|
entities. Enclose space-separated lists by quotation marks.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--pattern <em class="replaceable"><code>PATTERNVALUE</code></em></code></span></dt><dd><p>
|
||||||
|
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.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--postvalid</code></span></dt><dd><p>Validate after parsing has completed.</p></dd><dt><span class="term"><code class="option">--push</code></span></dt><dd><p>Use the push mode of the parser.</p></dd><dt><span class="term"><code class="option">--recover</code></span></dt><dd><p>Output any parsable portions of an invalid document.</p></dd><dt><span class="term"><code class="option">--relaxng <em class="replaceable"><code>SCHEMA</code></em></code></span></dt><dd><p>
|
||||||
|
Use RelaxNG file named <em class="replaceable"><code>SCHEMA</code></em>
|
||||||
|
for validation.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--repeat</code></span></dt><dd><p>Repeat 100 times, for timing or profiling.</p></dd><dt><span class="term"><code class="option">--schema <em class="replaceable"><code>SCHEMA</code></em></code></span></dt><dd><p>
|
||||||
|
Use a W3C <acronym class="acronym">XML</acronym> Schema file
|
||||||
|
named <em class="replaceable"><code>SCHEMA</code></em> for validation.
|
||||||
|
</p></dd><dt><span class="term"><code class="option">--shell</code></span></dt><dd><p>
|
||||||
Run a navigating shell. Details on available commands in shell mode
|
Run a navigating shell. Details on available commands in shell mode
|
||||||
are below.
|
are below (see <a class="xref" href="#shell" title="SHELL COMMANDS">the section called “SHELL COMMANDS”</a>).
|
||||||
</dd><dt><span class="term"><tt class="option">--debugent</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--xpath "<em class="replaceable"><code>XPath_expression</code></em>"</code></span></dt><dd><p>
|
||||||
Debug the entities defined in the document.
|
Run an XPath expression given as argument and print the
|
||||||
</dd><dt><span class="term"><tt class="option">--copy</tt> </span></dt><dd>
|
result. In case of a nodeset result, each node in the
|
||||||
Test the internal copy implementation.
|
node set is serialized in full in the output. In case
|
||||||
</dd><dt><span class="term"><tt class="option">--recover</tt></span></dt><dd>
|
of an empty node set the "XPath set is empty" result
|
||||||
Output any parsable portions of an invalid
|
will be shown and an error exit code will be returned.
|
||||||
document.
|
</p></dd><dt><span class="term"><code class="option">--stream</code></span></dt><dd><p>
|
||||||
</dd><dt><span class="term"><tt class="option">--noent</tt></span></dt><dd>
|
Use streaming <acronym class="acronym">API</acronym> - useful when used in combination
|
||||||
Substitute entity values for entity
|
with <code class="option">--relaxng</code> or <code class="option">--valid</code> options
|
||||||
references. By default, <span class="application">xmllint</span> leaves entity
|
for validation of files that are too large to be held in memory.
|
||||||
references in place.
|
</p></dd><dt><span class="term"><code class="option">--testIO</code></span></dt><dd><p>Test user input/output support.</p></dd><dt><span class="term"><code class="option">--timing</code></span></dt><dd><p>
|
||||||
</dd><dt><span class="term"><tt class="option">--nocdata</tt></span></dt><dd>
|
Output information about the time it takes <span class="command"><strong>xmllint</strong></span> to perform the
|
||||||
Substitute CDATA section by equivalent text nodes.
|
various steps.
|
||||||
</dd><dt><span class="term"><tt class="option">--nsclean</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--valid</code></span></dt><dd><p>
|
||||||
Remove redundant namespace declarations.
|
Determine if the document is a valid instance of the included
|
||||||
</dd><dt><span class="term"><tt class="option">--noout</tt></span></dt><dd>
|
Document Type Definition (<acronym class="acronym">DTD</acronym>).
|
||||||
Suppress output. By default,
|
A <acronym class="acronym">DTD</acronym> to be validated against also can be
|
||||||
<span class="application">xmllint</span> outputs the result tree.
|
specified at the command line using the <code class="option">--dtdvalid</code>
|
||||||
</dd><dt><span class="term"><tt class="option">--htmlout</tt></span></dt><dd>
|
option. By default, <span class="command"><strong>xmllint</strong></span> also checks to determine if the
|
||||||
Output results as an <span class="acronym">HTML</span>
|
|
||||||
file. This causes <span class="application">xmllint</span> to output
|
|
||||||
the necessary <span class="acronym">HTML</span> tags surrounding the result tree
|
|
||||||
output so the results can be displayed in a browser.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--nowrap </tt></span></dt><dd>
|
|
||||||
Do not output HTML doc wrapper.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--valid </tt></span></dt><dd>
|
|
||||||
Determine if the document is a valid instance
|
|
||||||
of the included Document Type Definition (<span class="acronym">DTD</span>). A
|
|
||||||
<span class="acronym">DTD</span> to be validated against also can be specified at
|
|
||||||
the command line using the <tt class="option">--dtdvalid</tt> option. By default,
|
|
||||||
<span class="application">xmllint</span> also checks to determine if the
|
|
||||||
document is well-formed.
|
document is well-formed.
|
||||||
</dd><dt><span class="term"><tt class="option">--postvalid</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--version</code></span></dt><dd><p>
|
||||||
Validate after parsing is completed.
|
Display the version of <span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span> used.
|
||||||
</dd><dt><span class="term"> <tt class="option">--dtdvalid</tt> <i class="replaceable"><tt>URL</tt></i></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">--walker</code></span></dt><dd><p>
|
||||||
Use the
|
Test the walker module, which is a reader interface but for a
|
||||||
<span class="acronym">DTD</span> specified by <i class="replaceable"><tt>URL</tt></i> for
|
document tree, instead of using the reader <acronym class="acronym">API</acronym> on
|
||||||
validation.
|
an unparsed document it works on an existing in-memory tree. Used for
|
||||||
</dd><dt><span class="term"> <tt class="option">--dtdvalidfpi</tt> <i class="replaceable"><tt>FPI</tt></i></span></dt><dd>
|
debugging.
|
||||||
Use the
|
</p></dd><dt><span class="term"><code class="option">--xinclude</code></span></dt><dd><p>Do XInclude processing.</p></dd><dt><span class="term"><code class="option">--xmlout</code></span></dt><dd><p>
|
||||||
<span class="acronym">DTD</span> specified by the Public Identifier
|
Used in conjunction with <code class="option">--html</code>. Usually
|
||||||
<i class="replaceable"><tt>FPI</tt></i> for validation, note that this
|
when <acronym class="acronym">HTML</acronym> is parsed the document is saved with
|
||||||
will require a Catalog exporting that Public Identifier to work.
|
the <acronym class="acronym">HTML</acronym> serializer. But with this option the
|
||||||
</dd><dt><span class="term"><tt class="option">--timing</tt></span></dt><dd>
|
resulting document is saved with the <acronym class="acronym">XML</acronym>
|
||||||
Output information about the time it takes
|
serializer. This is primarily used to
|
||||||
<span class="application">xmllint</span> to perform the various steps.
|
generate <acronym class="acronym">XHTML</acronym> from <acronym class="acronym">HTML</acronym> input.
|
||||||
</dd><dt><span class="term"><tt class="option">--output</tt> <i class="replaceable"><tt>file</tt></i></span></dt><dd>Define a file path where xmllint will save the result of
|
</p></dd></dl></div></div><div class="refsect1"><a name="shell"></a><h2>SHELL COMMANDS</h2><p>
|
||||||
parsing. Usually the programs build a tree and save it on stdout, with
|
<span class="command"><strong>xmllint</strong></span> offers an interactive shell mode invoked with
|
||||||
this option the result XML instance will be saved onto a file.</dd><dt><span class="term"><tt class="option">--repeat</tt></span></dt><dd>
|
the <code class="option">--shell</code> command. Available commands in shell mode
|
||||||
Repeat 100 times, for timing or profiling.
|
include (in alphabetical order):
|
||||||
</dd><dt><span class="term"><tt class="option">--insert</tt></span></dt><dd>
|
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="command"><strong>base</strong></span></span></dt><dd><p>Display <acronym class="acronym">XML</acronym> base of the node.</p></dd><dt><span class="term"><span class="command"><strong>bye</strong></span></span></dt><dd><p>Leave the shell.</p></dd><dt><span class="term"><span class="command"><strong>cat <em class="replaceable"><code>NODE</code></em></strong></span></span></dt><dd><p>Display the given node or the current one.</p></dd><dt><span class="term"><span class="command"><strong>cd <em class="replaceable"><code>PATH</code></em></strong></span></span></dt><dd><p>
|
||||||
Test for valid insertions.
|
Change the current node to the given path (if unique) or root if no
|
||||||
</dd><dt><span class="term"><tt class="option">--compress</tt></span></dt><dd>
|
argument is given.
|
||||||
Turn on gzip compression of output.
|
</p></dd><dt><span class="term"><span class="command"><strong>dir <em class="replaceable"><code>PATH</code></em></strong></span></span></dt><dd><p>
|
||||||
</dd><dt><span class="term"><tt class="option">--html</tt></span></dt><dd>
|
|
||||||
Use the <span class="acronym">HTML</span> parser.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--xmlout</tt></span></dt><dd>Used in conjunction with <tt class="option">--html</tt>. Usually
|
|
||||||
when HTML is parsed the document is saved with the HTML serializer, but with
|
|
||||||
this option the resulting document is saved with the XML serializer. This is
|
|
||||||
primarily used to generate XHTML from HTML input.</dd><dt><span class="term"><tt class="option">--push</tt></span></dt><dd>
|
|
||||||
Use the push mode of the parser.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--memory</tt></span></dt><dd>
|
|
||||||
Parse from memory.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--maxmem</tt> <i class="replaceable"><tt>nnbytes</tt></i></span></dt><dd>Test the parser memory
|
|
||||||
support. <i class="replaceable"><tt>nnbytes</tt></i> is the maximum number of bytes the
|
|
||||||
library is allowed to allocate. This can also be used to make sure batch
|
|
||||||
processing of XML files will not exhaust the virtual memory of the server
|
|
||||||
running them.</dd><dt><span class="term"><tt class="option">--nowarning</tt></span></dt><dd>
|
|
||||||
Do not emit warnings from the parser and/or validator.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--noblanks</tt></span></dt><dd>
|
|
||||||
Drop ignorable blank spaces.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--format</tt></span></dt><dd>
|
|
||||||
Reformat and reindent the output. The $XMLLINT_INDENT
|
|
||||||
environment variable controls the indentation (default
|
|
||||||
value is two spaces " ").
|
|
||||||
</dd><dt><span class="term"><tt class="option">--testIO</tt></span></dt><dd>
|
|
||||||
Test user input/output support.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--encode</tt> <i class="replaceable"><tt>encoding</tt></i></span></dt><dd>
|
|
||||||
Output in the given encoding.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--catalogs</tt></span></dt><dd>
|
|
||||||
Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog
|
|
||||||
is used by default.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--nocatalogs</tt></span></dt><dd>
|
|
||||||
Do not use any catalogs.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--auto</tt></span></dt><dd>
|
|
||||||
Generate a small document for testing purposes.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--xinclude</tt></span></dt><dd>
|
|
||||||
Do XInclude processing.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--noxincludenode</tt></span></dt><dd>
|
|
||||||
Do XInclude processing but do not generate XInclude start and end
|
|
||||||
nodes.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--loaddtd</tt></span></dt><dd>
|
|
||||||
Fetch external DTD.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--dtdattr</tt></span></dt><dd>
|
|
||||||
Fetch external DTD and populate the tree with inherited attributes.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--dropdtd</tt></span></dt><dd>
|
|
||||||
Remove <span class="acronym">DTD</span> from output.
|
|
||||||
</dd><dt><span class="term"><tt class="option">--stream</tt></span></dt><dd>Use streaming API - useful when used in combination with
|
|
||||||
--relaxng or --valid options for validation of files that are
|
|
||||||
too large to be held in memory.</dd><dt><span class="term"><tt class="option">--walker</tt></span></dt><dd>Test the walker module, which is a reader interface but for a
|
|
||||||
document tree, instead of using the reader API on an unparsed document it
|
|
||||||
works on a existing in-memory tree. Used in debugging.</dd><dt><span class="term"><tt class="option">--chkregister</tt></span></dt><dd>Turn on node registration. Useful for developers testing
|
|
||||||
libxml2 node tracking code.</dd><dt><span class="term"><tt class="option">--pattern</tt> <i class="replaceable"><tt>patternvalue</tt></i></span></dt><dd>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.</dd><dt><span class="term"><tt class="option">--relaxng</tt> <i class="replaceable"><tt>schema</tt></i></span></dt><dd>Use RelaxNG file named <i class="replaceable"><tt>schema</tt></i> for
|
|
||||||
validation.</dd><dt><span class="term"><tt class="option">--schema</tt> <i class="replaceable"><tt>schema</tt></i></span></dt><dd>Use a W3C XML Schema file named <i class="replaceable"><tt>schema</tt></i> for validation.</dd><dt><span class="term">
|
|
||||||
<tt class="option">--c14n</tt></span></dt><dd>Use the W3C XML Canonicalisation (C14N) to
|
|
||||||
serialize the result of parsing to stdout. It keeps comments in
|
|
||||||
the result.</dd></dl></div></div><div class="refsect1" lang="en"><a name="shell"></a><h2>Shell</h2><p>
|
|
||||||
<span class="application">xmllint</span> offers an interactive shell mode
|
|
||||||
invoked with the <tt class="option">--shell</tt> command. Available commands in
|
|
||||||
shell mode include:
|
|
||||||
</p><div class="variablelist"><dl><dt><span class="term"><tt class="option">base</tt></span></dt><dd>
|
|
||||||
display XML base of the node
|
|
||||||
</dd><dt><span class="term"><tt class="option">bye</tt></span></dt><dd>
|
|
||||||
leave shell
|
|
||||||
</dd><dt><span class="term"><tt class="option">cat <i class="replaceable"><tt>node</tt></i></tt></span></dt><dd>
|
|
||||||
Display node if given or current node.
|
|
||||||
</dd><dt><span class="term"><tt class="option">cd <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
|
|
||||||
Change the current node to <i class="replaceable"><tt>path</tt></i> (if given
|
|
||||||
and unique) or root if no argument given.
|
|
||||||
</dd><dt><span class="term"><tt class="option">dir <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
|
|
||||||
Dumps information about the node (namespace, attributes, content).
|
Dumps information about the node (namespace, attributes, content).
|
||||||
</dd><dt><span class="term"><tt class="option">du <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
|
</p></dd><dt><span class="term"><span class="command"><strong>du <em class="replaceable"><code>PATH</code></em></strong></span></span></dt><dd><p>
|
||||||
Show the structure of the subtree under path or the current node.
|
Show the structure of the subtree under the given path or the current node.
|
||||||
</dd><dt><span class="term"><tt class="option">exit</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><span class="command"><strong>exit</strong></span></span></dt><dd><p>Leave the shell.</p></dd><dt><span class="term"><span class="command"><strong>help</strong></span></span></dt><dd><p>Show this help.</p></dd><dt><span class="term"><span class="command"><strong>free</strong></span></span></dt><dd><p>Display memory usage.</p></dd><dt><span class="term"><span class="command"><strong>load <em class="replaceable"><code>FILENAME</code></em></strong></span></span></dt><dd><p>Load a new document with the given filename.</p></dd><dt><span class="term"><span class="command"><strong>ls <em class="replaceable"><code>PATH</code></em></strong></span></span></dt><dd><p>List contents of the given path or the current directory.</p></dd><dt><span class="term"><span class="command"><strong>pwd</strong></span></span></dt><dd><p>Display the path to the current node.</p></dd><dt><span class="term"><span class="command"><strong>quit</strong></span></span></dt><dd><p>Leave the shell.</p></dd><dt><span class="term"><span class="command"><strong>save <em class="replaceable"><code>FILENAME</code></em></strong></span></span></dt><dd><p>
|
||||||
Leave the shell.
|
Save the current document to the given filename or to the original name.
|
||||||
</dd><dt><span class="term"><tt class="option">help</tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="option">validate</code></span></dt><dd><p>Check the document for errors.</p></dd><dt><span class="term"><span class="command"><strong>write <em class="replaceable"><code>FILENAME</code></em></strong></span></span></dt><dd><p>Write the current node to the given filename.</p></dd></dl></div></div><div class="refsect1"><a name="environment"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">SGML_CATALOG_FILES</code></span></dt><dd><p><acronym class="acronym">SGML</acronym> catalog behavior can be changed by redirecting
|
||||||
Show this help.
|
queries to the user's own set of catalogs. This can be done by setting
|
||||||
</dd><dt><span class="term"><tt class="option">free</tt></span></dt><dd>
|
the <code class="envar">SGML_CATALOG_FILES</code> environment variable to a list
|
||||||
Display memory usage.
|
of catalogs. An empty one should deactivate loading the
|
||||||
</dd><dt><span class="term"><tt class="option">load <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
|
default <code class="filename">/etc/sgml/catalog</code> catalog.
|
||||||
Load a new document with the given name.
|
</p></dd><dt><span class="term"><code class="envar">XML_CATALOG_FILES</code></span></dt><dd><p><acronym class="acronym">XML</acronym> catalog behavior can be changed by redirecting
|
||||||
</dd><dt><span class="term"><tt class="option">ls <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
|
queries to the user's own set of catalogs. This can be done by setting
|
||||||
List contents of <i class="replaceable"><tt>path</tt></i> (if given) or the
|
the <code class="envar">XML_CATALOG_FILES</code> environment variable to a list
|
||||||
current directory.
|
of catalogs. An empty one should deactivate loading the
|
||||||
</dd><dt><span class="term"><tt class="option">pwd</tt></span></dt><dd>
|
default <code class="filename">/etc/xml/catalog</code> catalog.
|
||||||
Display the path to the current node.
|
</p></dd><dt><span class="term"><code class="envar">XML_DEBUG_CATALOG</code></span></dt><dd><p>Setting the environment variable <code class="envar">XML_DEBUG_CATALOG</code>
|
||||||
</dd><dt><span class="term"><tt class="option">quit</tt></span></dt><dd>
|
to <em class="parameter"><code>non-zero</code></em> using the <span class="command"><strong>export</strong></span>
|
||||||
Leave the shell.
|
command outputs debugging information related to catalog operations.
|
||||||
</dd><dt><span class="term"><tt class="option">save <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
|
</p></dd><dt><span class="term"><code class="envar">XMLLINT_INDENT</code></span></dt><dd><p>Setting the environment variable <code class="envar">XMLLINT_INDENT</code>
|
||||||
Saves the current document to <i class="replaceable"><tt>name</tt></i> if
|
controls the indentation. The default value is two spaces " ".
|
||||||
given or to the original name.
|
</p></dd></dl></div></div><div class="refsect1"><a name="diagnostics"></a><h2>DIAGNOSTICS</h2><p>
|
||||||
</dd><dt><span class="term"><tt class="option">validate</tt></span></dt><dd>
|
<span class="command"><strong>xmllint</strong></span> return codes provide information that can be used when
|
||||||
Check the document for error.
|
calling it from scripts.
|
||||||
</dd><dt><span class="term"><tt class="option">write <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
|
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">0</span></span></dt><dd><p>No error</p></dd><dt><span class="term"><span class="errorcode">1</span></span></dt><dd><p>Unclassified</p></dd><dt><span class="term"><span class="errorcode">2</span></span></dt><dd><p>Error in <acronym class="acronym">DTD</acronym></p></dd><dt><span class="term"><span class="errorcode">3</span></span></dt><dd><p>Validation error</p></dd><dt><span class="term"><span class="errorcode">4</span></span></dt><dd><p>Validation error</p></dd><dt><span class="term"><span class="errorcode">5</span></span></dt><dd><p>Error in schema compilation</p></dd><dt><span class="term"><span class="errorcode">6</span></span></dt><dd><p>Error writing output</p></dd><dt><span class="term"><span class="errorcode">7</span></span></dt><dd><p>
|
||||||
Write the current node to the given filename.
|
Error in pattern (generated when <code class="option">--pattern</code> option is used)
|
||||||
</dd></dl></div></div><div class="refsect1" lang="en"><h2>Catalogs</h2><p>Catalog behavior can be changed by redirecting
|
</p></dd><dt><span class="term"><span class="errorcode">8</span></span></dt><dd><p>
|
||||||
queries to the user's own set of catalogs. This can be done by setting the
|
Error in Reader registration (generated
|
||||||
<tt class="varname">XML_CATALOG_FILES</tt> environment variable to a list of
|
when <code class="option">--chkregister</code> option is used)
|
||||||
catalogs. An empty one should deactivate loading the default
|
</p></dd><dt><span class="term"><span class="errorcode">9</span></span></dt><dd><p>Out of memory error</p></dd></dl></div></div><div class="refsect1"><a name="seealso"></a><h2>SEE ALSO</h2><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span>
|
||||||
<tt class="filename">/etc/xml/catalog</tt> default catalog.</p></div><div class="refsect1" lang="en"><h2>Debugging Catalogs</h2><p>Setting the environment variable <tt class="varname">XML_DEBUG_CATALOG</tt>
|
</p><p>
|
||||||
using the command <b class="command">"export XML_DEBUG_CATALOG="</b>
|
More information can be found at
|
||||||
outputs debugging information related to catalog operations.</p></div><div class="refsect1" lang="en"><h2>Error Return Codes</h2><p>On the completion of execution, <span class="application">Xmllint</span>
|
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span> web page <a class="ulink" href="http://www.xmlsoft.org/" target="_top">http://www.xmlsoft.org/</a>
|
||||||
returns the following error codes:</p><div class="variablelist"><dl><dt><span class="term">0</span></dt><dd>No error</dd><dt><span class="term">1</span></dt><dd>Unclassified</dd><dt><span class="term">2</span></dt><dd>Error in DTD</dd><dt><span class="term">3</span></dt><dd>Validation error</dd><dt><span class="term">4</span></dt><dd>Validation error</dd><dt><span class="term">5</span></dt><dd>Error in schema compilation</dd><dt><span class="term">6</span></dt><dd>Error writing output</dd><dt><span class="term">7</span></dt><dd>Error in pattern (generated when
|
</p></li><li class="listitem"><p>W3C <acronym class="acronym">XSLT</acronym> page <a class="ulink" href="http://www.w3.org/TR/xslt" target="_top">http://www.w3.org/TR/xslt</a>
|
||||||
[<span class="optional">--pattern</span>] option is used)</dd><dt><span class="term">8</span></dt><dd>Error in Reader registration (generated when
|
</p></li></ul></div><p>
|
||||||
[<span class="optional">--chkregister</span>] option is used)</dd><dt><span class="term">9</span></dt><dd>Out of memory error</dd></dl></div></div></div></body></html>
|
</p></div></div></body></html>
|
||||||
|
|||||||
Reference in New Issue
Block a user