2 <?xml-stylesheet type="text/xsl"
3 href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
4 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
5 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
9 <title>xmlcatalog Manual</title>
14 <firstname>John</firstname>
15 <surname>Fleck</surname>
17 <address><email>jfleck@inkstain.net</email></address>
19 <releaseinfo>This is release 0.2 of the xmlcatalog Manual.</releaseinfo>
23 <refentrytitle>xmlcatalog</refentrytitle>
24 <manvolnum>1</manvolnum>
27 <refname>xmlcatalog</refname>
28 <refpurpose>Command line tool to parse and manipulate <acronym>XML</acronym> or
29 <acronym>SGML</acronym> catalog files.</refpurpose>
34 <command>xmlcatalog</command>
38 <arg>--add <replaceable>type</replaceable>
39 <replaceable>orig</replaceable> <replaceable>replace</replaceable></arg>
40 <arg>--del <replaceable>values</replaceable></arg>
44 <arg><option><replaceable>catalogfile</replaceable></option></arg>
45 <arg><option><replaceable>entities</replaceable></option></arg>
49 <refsect1 id="introduction">
50 <title>Introduction</title>
52 <application>xmlcatalog</application> is a command line application
53 allowing users to monitor and manipulate <acronym>XML</acronym> and
54 <acronym>SGML</acronym> catalogs. It is included in
55 <application>libxml2</application>.
59 Its functions can be invoked from a single command from the command line,
60 or it can perform multiple functions in interactive mode. It can operate
61 on both <acronym>XML</acronym> and <acronym>SGML</acronym> files.
65 <refsect1 id="cloptions">
66 <title>Command Line Options</title>
69 <term><option>--shell</option> <replaceable>filename</replaceable></term>
73 allowing interactive queries on catalog file
74 <replaceable>filename</replaceable>.
79 <term><option>--create</option> <replaceable>filename</replaceable></term>
83 <acronym>XML</acronym> catalog. Outputs to stdout, ignoring
84 <replaceable>filename</replaceable> unless <option>--noout</option> is
85 used, in which case it creates a new catalog file
86 <replaceable>filename</replaceable>.
92 <term><option>--add</option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable> <replaceable>filename</replaceable></term>
95 Add an entry to catalog file
96 <filename>filename</filename>. <replaceable>type</replaceable>
97 indicates the type of entry. Possible types are 'public', 'system',
98 'rewriteSystem', 'delegatePublic', 'delegateSystem'amd
99 'rewriteURI'. <replaceable>'orig'</replaceable> is the original
100 reference to be replaced, and <replaceable>'replace'</replaceable>
101 is the <acronym>URI</acronym> of the replacement entity to be
102 used. The <option>--add</option> option will not overwrite
103 <replaceable>filename</replaceable>, outputing to stdout, unless
104 <option>--noout</option> is used. The <option>--add</option> will
105 always take three parameters even if some of the
106 <acronym>XML</acronym> catalog constructs will have only a single
109 FIXME - Is my list of possible types correct? Are SGML types the same?
113 If the <option>--add</option> option is used following the
114 <option>--sgml</option> option, only a single argument, a
115 <replaceable>filename</replaceable>, is used. This is used to add
116 the name of a catalog file to an <acronym>SGML</acronym>
117 supercatalog, a file that contains references to other included
118 <acronym>SGML</acronym> catalog files.
123 <term><option>--del</option> <replaceable>'values'</replaceable> <replaceable>filename</replaceable></term>
126 Remove entries from the catalog file
127 <replaceable>filename</replaceable> matching
128 <replaceable>'values'</replaceable>. The <option>--del</option> option
129 will not overwrite <replaceable>filename</replaceable>, outputing to
130 stdout, unless <option>--noout</option> is used.
135 <term><option>--noout</option></term>
138 Save output to the named file rather than
144 <term><option>--sgml</option></term>
147 Uses SGML Super catalogs for --add and --del options
152 <term><option>-v</option> or <option>--verbose</option></term>
163 <refsect1 id="shell">
164 <title>Shell Commands</title>
165 <para>Invoking <application>xmlcatalog</application> with the
166 <option>--shell</option> <replaceable>filename</replaceable> option opens
167 a command line shell allowing interactive access to the catalog file
168 identified by <replaceable>filename</replaceable>. Invoking the shell
169 provides a command line prompt after which commands can be entered.
174 <term><option>public</option> <replaceable>'PublicID'</replaceable></term>
178 public identifier lookup of the catalog entry for
179 <replaceable>'PublicID'</replaceable>. The corresponding entry will be
180 output to the command line.
186 <term><option>system</option> <replaceable>'SystemID'</replaceable></term>
190 public identifier lookup of the catalog entry for
191 <replaceable>'SystemID'</replaceable>. The corresponding entry will be
192 output to the command line.
197 <term><option>add </option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable></term>
200 Add an entry to the catalog
201 file. <replaceable>type</replaceable> indicates the type of
202 entry. Possible types are 'public', 'system', 'rewriteSystem',
203 'delegatePublic' and 'delegateSystem'. <replaceable>'orig'</replaceable>
204 is the original reference to be replaced, and
205 <replaceable>'replace'</replaceable> is the <acronym>URI</acronym> of the
206 replacement entity to be used.
211 <term><option>del</option> <replaceable>'values'</replaceable></term>
215 catalog entry corresponding to <replaceable>'values'</replaceable>.
221 <term><option>dump</option></term>
224 Print the current catalog.
230 <term><option>debug</option></term>
233 Print debugging statements showing the steps
234 <application>xmlcatalog</application> is executing.
240 <term><option>quiet</option></term>
243 Stop printing debugging statements.
249 <term><option>exit</option></term>
260 <refsect1 id="return">
261 <title>Return values</title>
262 <para><application>xmlcatalog</application>'s return codes provide
263 information that can be used when calling it from scripts.</para>
265 <para>0: normal</para>
266 <para>1: Failed to remove an entry from the catalog</para>
267 <para>2: Failed to save to the catalog, check file permissions</para>
268 <para>3: Failed to add an entry to the catalog</para>
269 <para>4: Failed to lookup and entry in the catalog</para>
273 <title>References</title>
274 <para><ulink url="http://www.xmlsoft.org/">libxml web page</ulink></para>
276 <para><ulink url="http://www.xmlsoft.org/catalog.html"><application>libxml</application>
277 catalog support web page:</ulink></para>
279 <para><ulink url="http://www.jclark.com/sp/catalog.htm">James Clark's
280 <acronym>SGML</acronym> catalog page:</ulink></para>
283 url="http://www.oasis-open.org/committees/entity/spec.html"><acronym>OASIS</acronym>
284 <acronym>XML</acronym> catalog specification: </ulink></para>