blob: 8166e0e6815a4d0759d8c135f2f11911059988c9 [file] [log] [blame]
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +00001<?xml version="1.0"?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4]>
5<refentry>
6 <refentryinfo>
7 <title>xmlcatalog Manual</title>
8 <copyright>
9 <year>2001</year>
10 </copyright>
11 <author>
12 <firstname>John</firstname>
13 <surname>Fleck</surname>
14 </author>
15 <address><email>jfleck@inkstain.net</email></address>
MST 2001 John Fleck3fc555e2001-12-11 04:41:24 +000016
17 <releaseinfo>This is release 0.2 of the xmlcatalog Manual.</releaseinfo>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +000018 </refentryinfo>
19
20 <refmeta>
21 <refentrytitle>xmlcatalog</refentrytitle>
22 <manvolnum>1</manvolnum>
23 </refmeta>
24 <refnamediv>
25 <refname>xmlcatalog</refname>
26 <refpurpose>Command line tool to parse and manipulate <acronym>XML</acronym> or
27 <acronym>SGML</acronym> catalog files.</refpurpose>
28 </refnamediv>
29
30 <refsynopsisdiv>
31 <cmdsynopsis>
32 <command>xmlcatalog</command>
33 <group>
34 <arg>--shell</arg>
35 <arg>--create</arg>
36 <arg>--add <replaceable>type</replaceable>
37 <replaceable>orig</replaceable> <replaceable>replace</replaceable></arg>
38 <arg>--del <replaceable>values</replaceable></arg>
39 <arg>--noout</arg>
40 <arg>--verbose</arg>
41 </group>
42 <arg><option><replaceable>catalogfile</replaceable></option></arg>
43 <arg><option><replaceable>entities</replaceable></option></arg>
44 </cmdsynopsis>
45 </refsynopsisdiv>
46
47 <refsect1 id="introduction">
48 <title>Introduction</title>
49 <para>
50 <application>xmlcatalog</application> is a command line application
51 allowing users to monitor and manipulate <acronym>XML</acronym> and
52 <acronym>SGML</acronym> catalogs. It is included in
53 <application>libxml2</application>.
54 </para>
55
56 <para>
57 Its functions can be invoked from a single command from the command line,
58 or it can perform multiple functions in interactive mode. It can operate
59 on both <acronym>XML</acronym> and <acronym>SGML</acronym> files.
60 </para>
61 </refsect1>
62
63 <refsect1 id="cloptions">
64 <title>Command Line Options</title>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000065 <variablelist>
66 <varlistentry>
67 <term><option>--shell</option> <replaceable>filename</replaceable></term>
68 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000069 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000070 Run a shell
71 allowing interactive queries on catalog file
72 <replaceable>filename</replaceable>.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000073 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000074 </listitem>
75 </varlistentry>
76 <varlistentry>
77 <term><option>--create</option> <replaceable>filename</replaceable></term>
78 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000079 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000080 Create a new
81 <acronym>XML</acronym> catalog. Outputs to stdout, ignoring
82 <replaceable>filename</replaceable> unless <option>--noout</option> is
83 used, in which case it creates a new catalog file
84 <replaceable>filename</replaceable>.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000085 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000086 </listitem>
87 </varlistentry>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +000088
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000089 <varlistentry>
90 <term><option>--add</option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable> <replaceable>filename</replaceable></term>
91 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000092 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000093 Add an entry to catalog file
94 <filename>filename</filename>. <replaceable>type</replaceable> indicates
95 the type of entry. Possible types are 'public', 'system', 'rewriteSystem',
96 'delegatePublic' and 'delegateSystem'. <replaceable>'orig'</replaceable>
97 is the original reference to
98 be replaced, and <replaceable>'replace'</replaceable> is the
99 <acronym>URI</acronym> of the replacement entity to be used. The
MDT 2001 John Fleck60416fa2001-10-09 02:41:50 +0000100 <option>--add</option> option will not overwrite
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000101 <replaceable>filename</replaceable>, outputing to stdout, unless
102 <option>--noout</option> is used. The <option>--add</option> will always
103 take three parameters even if some of the <acronym>XML</acronym> catalog
104 constructs will have only a single argument.
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000105<!--
106FIXME - Is my list of possible types correct? Are SGML types the same?
107-->
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000108 </simpara>
MDT 2001 John Fleck60416fa2001-10-09 02:41:50 +0000109 <simpara>
110 If the <option>--add</option> option is used following the
111 <option>--sgml</option> option, only a single argument, a
112 <replaceable>filename</replaceable>, is used. This is used to add
113 the name of a catalog file to an <acronym>SGML</acronym>
114 supercatalog, a file that contains references to other included
115 <acronym>SGML</acronym> catalog files.
116 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000117 </listitem>
118 </varlistentry>
119 <varlistentry>
120 <term><option>--del</option> <replaceable>'values'</replaceable> <replaceable>filename</replaceable></term>
121 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000122 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000123 Remove entries from the catalog file
124 <replaceable>filename</replaceable> matching
125 <replaceable>'values'</replaceable>. The <option>--del</option> option
126 will not overwrite <replaceable>filename</replaceable>, outputing to
127 stdout, unless <option>--noout</option> is used.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000128 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000129 </listitem>
130 </varlistentry>
131 <varlistentry>
132 <term><option>--noout</option></term>
133 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000134 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000135 Save output to the named file rather than
136 outputing to stdout.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000137 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000138 </listitem>
139 </varlistentry>
140 <varlistentry>
141 <term><option>-v</option> or <option>--verbose</option></term>
142 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000143 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000144 output debugging
145 information.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000146 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000147 </listitem>
148 </varlistentry>
149 </variablelist>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000150 </refsect1>
151
152 <refsect1 id="shell">
153 <title>Shell Commands</title>
154 <para>Invoking <application>xmlcatalog</application> with the
155 <option>--shell</option> <replaceable>filename</replaceable> option opens
156 a command line shell allowing interactive access to the catalog file
157 identified by <replaceable>filename</replaceable>. Invoking the shell
158 provides a command line prompt after which commands can be entered.
159 </para>
160
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000161 <variablelist>
162 <varlistentry>
163 <term><option>public</option> <replaceable>'PublicID'</replaceable></term>
164 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000165 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000166 Execute a
167 public identifier lookup of the catalog entry for
168 <replaceable>'PublicID'</replaceable>. The corresponding entry will be
169 output to the command line.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000170 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000171 </listitem>
172 </varlistentry>
173
174 <varlistentry>
175 <term><option>system</option> <replaceable>'SystemID'</replaceable></term>
176 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000177 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000178 Execute a
179 public identifier lookup of the catalog entry for
180 <replaceable>'SystemID'</replaceable>. The corresponding entry will be
181 output to the command line.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000182 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000183 </listitem>
184 </varlistentry>
185 <varlistentry>
186 <term><option>add </option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable></term>
187 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000188 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000189 Add an entry to the catalog
190 file. <replaceable>type</replaceable> indicates the type of
191 entry. Possible types are 'public', 'system', 'rewriteSystem',
192 'delegatePublic' and 'delegateSystem'. <replaceable>'orig'</replaceable>
193 is the original reference to be replaced, and
194 <replaceable>'replace'</replaceable> is the <acronym>URI</acronym> of the
195 replacement entity to be used.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000196 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000197 </listitem>
198 </varlistentry>
199 <varlistentry>
200 <term><option>del</option> <replaceable>'values'</replaceable></term>
201 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000202 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000203 Remove the
204 catalog entry corresponding to <replaceable>'values'</replaceable>.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000205 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000206 </listitem>
207 </varlistentry>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000208
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000209 <varlistentry>
210 <term><option>dump</option></term>
211 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000212 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000213 Print the current catalog.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000214 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000215 </listitem>
216 </varlistentry>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000217
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000218 <varlistentry>
219 <term><option>debug</option></term>
220 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000221 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000222 Print debugging statements showing the steps
223 <application>xmlcatalog</application> is executing.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000224 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000225 </listitem>
226 </varlistentry>
227
228 <varlistentry>
229 <term><option>quiet</option></term>
230 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000231 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000232 Stop printing debugging statements.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000233 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000234 </listitem>
235 </varlistentry>
236
237 <varlistentry>
238 <term><option>exit</option></term>
239 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000240 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000241 Quit the shell.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000242 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000243 </listitem>
244 </varlistentry>
245 </variablelist>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000246
247 </refsect1>
248
MST 2001 John Fleck3fc555e2001-12-11 04:41:24 +0000249 <refsect1>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000250 <title>References</title>
MST 2001 John Fleck3fc555e2001-12-11 04:41:24 +0000251 <para><ulink url="http://www.xmlsoft.org/">libxml web page</ulink></para>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000252
MST 2001 John Fleck3fc555e2001-12-11 04:41:24 +0000253 <para><ulink url="http://www.xmlsoft.org/catalog.html"><application>libxml</application>
254 catalog support web page:</ulink></para>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000255
MST 2001 John Fleck3fc555e2001-12-11 04:41:24 +0000256 <para><ulink url="http://www.jclark.com/sp/catalog.htm">James Clark's
257 <acronym>SGML</acronym> catalog page:</ulink></para>
258
259 <para><ulink
260 url="http://www.oasis-open.org/committees/entity/spec.html"><acronym>OASIS</acronym>
261 <acronym>XML</acronym> catalog specification: </ulink></para>
262</refsect1>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000263
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000264
265</refentry>