blob: 563d37ce6523112647fb599a1958e5a37d3a9ca7 [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>
16 <legalnotice id="legalnotice">
17 <para>Permission is granted to copy, distribute and/or modify this document
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000018 under the terms of the GNU Free Documentation
19 License, Version 1.1 or any later version
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +000020 published by the Free Software Foundation with no Invariant Sections,
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000021 no Front-Cover Texts, and no Back-Cover Texts.
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +000022 </para>
23 <para>Many of the names used by companies to distinguish their products and
24 services are claimed as trademarks. Where those names appear in any
25 GNOME documentation, and those trademarks are made aware to the members
26 of the GNOME Documentation Project, the names have been printed in caps
27 or initial caps.
28 </para>
29 </legalnotice>
30 <releaseinfo>This is release 0.1 of the xmlcatalog Manual.</releaseinfo>
31 </refentryinfo>
32
33 <refmeta>
34 <refentrytitle>xmlcatalog</refentrytitle>
35 <manvolnum>1</manvolnum>
36 </refmeta>
37 <refnamediv>
38 <refname>xmlcatalog</refname>
39 <refpurpose>Command line tool to parse and manipulate <acronym>XML</acronym> or
40 <acronym>SGML</acronym> catalog files.</refpurpose>
41 </refnamediv>
42
43 <refsynopsisdiv>
44 <cmdsynopsis>
45 <command>xmlcatalog</command>
46 <group>
47 <arg>--shell</arg>
48 <arg>--create</arg>
49 <arg>--add <replaceable>type</replaceable>
50 <replaceable>orig</replaceable> <replaceable>replace</replaceable></arg>
51 <arg>--del <replaceable>values</replaceable></arg>
52 <arg>--noout</arg>
53 <arg>--verbose</arg>
54 </group>
55 <arg><option><replaceable>catalogfile</replaceable></option></arg>
56 <arg><option><replaceable>entities</replaceable></option></arg>
57 </cmdsynopsis>
58 </refsynopsisdiv>
59
60 <refsect1 id="introduction">
61 <title>Introduction</title>
62 <para>
63 <application>xmlcatalog</application> is a command line application
64 allowing users to monitor and manipulate <acronym>XML</acronym> and
65 <acronym>SGML</acronym> catalogs. It is included in
66 <application>libxml2</application>.
67 </para>
68
69 <para>
70 Its functions can be invoked from a single command from the command line,
71 or it can perform multiple functions in interactive mode. It can operate
72 on both <acronym>XML</acronym> and <acronym>SGML</acronym> files.
73 </para>
74 </refsect1>
75
76 <refsect1 id="cloptions">
77 <title>Command Line Options</title>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000078 <variablelist>
79 <varlistentry>
80 <term><option>--shell</option> <replaceable>filename</replaceable></term>
81 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000082 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000083 Run a shell
84 allowing interactive queries on catalog file
85 <replaceable>filename</replaceable>.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000086 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000087 </listitem>
88 </varlistentry>
89 <varlistentry>
90 <term><option>--create</option> <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 Create a new
94 <acronym>XML</acronym> catalog. Outputs to stdout, ignoring
95 <replaceable>filename</replaceable> unless <option>--noout</option> is
96 used, in which case it creates a new catalog file
97 <replaceable>filename</replaceable>.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +000098 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +000099 </listitem>
100 </varlistentry>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000101
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000102 <varlistentry>
103 <term><option>--add</option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable> <replaceable>filename</replaceable></term>
104 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000105 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000106 Add an entry to catalog file
107 <filename>filename</filename>. <replaceable>type</replaceable> indicates
108 the type of entry. Possible types are 'public', 'system', 'rewriteSystem',
109 'delegatePublic' and 'delegateSystem'. <replaceable>'orig'</replaceable>
110 is the original reference to
111 be replaced, and <replaceable>'replace'</replaceable> is the
112 <acronym>URI</acronym> of the replacement entity to be used. The
MDT 2001 John Fleck60416fa2001-10-09 02:41:50 +0000113 <option>--add</option> option will not overwrite
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000114 <replaceable>filename</replaceable>, outputing to stdout, unless
115 <option>--noout</option> is used. The <option>--add</option> will always
116 take three parameters even if some of the <acronym>XML</acronym> catalog
117 constructs will have only a single argument.
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000118<!--
119FIXME - Is my list of possible types correct? Are SGML types the same?
120-->
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000121 </simpara>
MDT 2001 John Fleck60416fa2001-10-09 02:41:50 +0000122 <simpara>
123 If the <option>--add</option> option is used following the
124 <option>--sgml</option> option, only a single argument, a
125 <replaceable>filename</replaceable>, is used. This is used to add
126 the name of a catalog file to an <acronym>SGML</acronym>
127 supercatalog, a file that contains references to other included
128 <acronym>SGML</acronym> catalog files.
129 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000130 </listitem>
131 </varlistentry>
132 <varlistentry>
133 <term><option>--del</option> <replaceable>'values'</replaceable> <replaceable>filename</replaceable></term>
134 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000135 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000136 Remove entries from the catalog file
137 <replaceable>filename</replaceable> matching
138 <replaceable>'values'</replaceable>. The <option>--del</option> option
139 will not overwrite <replaceable>filename</replaceable>, outputing to
140 stdout, unless <option>--noout</option> is used.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000141 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000142 </listitem>
143 </varlistentry>
144 <varlistentry>
145 <term><option>--noout</option></term>
146 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000147 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000148 Save output to the named file rather than
149 outputing to stdout.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000150 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000151 </listitem>
152 </varlistentry>
153 <varlistentry>
154 <term><option>-v</option> or <option>--verbose</option></term>
155 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000156 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000157 output debugging
158 information.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000159 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000160 </listitem>
161 </varlistentry>
162 </variablelist>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000163 </refsect1>
164
165 <refsect1 id="shell">
166 <title>Shell Commands</title>
167 <para>Invoking <application>xmlcatalog</application> with the
168 <option>--shell</option> <replaceable>filename</replaceable> option opens
169 a command line shell allowing interactive access to the catalog file
170 identified by <replaceable>filename</replaceable>. Invoking the shell
171 provides a command line prompt after which commands can be entered.
172 </para>
173
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000174 <variablelist>
175 <varlistentry>
176 <term><option>public</option> <replaceable>'PublicID'</replaceable></term>
177 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000178 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000179 Execute a
180 public identifier lookup of the catalog entry for
181 <replaceable>'PublicID'</replaceable>. The corresponding entry will be
182 output to the command line.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000183 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000184 </listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term><option>system</option> <replaceable>'SystemID'</replaceable></term>
189 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000190 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000191 Execute a
192 public identifier lookup of the catalog entry for
193 <replaceable>'SystemID'</replaceable>. The corresponding entry will be
194 output to the command line.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000195 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000196 </listitem>
197 </varlistentry>
198 <varlistentry>
199 <term><option>add </option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable></term>
200 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000201 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000202 Add an entry to the catalog
203 file. <replaceable>type</replaceable> indicates the type of
204 entry. Possible types are 'public', 'system', 'rewriteSystem',
205 'delegatePublic' and 'delegateSystem'. <replaceable>'orig'</replaceable>
206 is the original reference to be replaced, and
207 <replaceable>'replace'</replaceable> is the <acronym>URI</acronym> of the
208 replacement entity to be used.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000209 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000210 </listitem>
211 </varlistentry>
212 <varlistentry>
213 <term><option>del</option> <replaceable>'values'</replaceable></term>
214 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000215 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000216 Remove the
217 catalog entry corresponding to <replaceable>'values'</replaceable>.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000218 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000219 </listitem>
220 </varlistentry>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000221
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000222 <varlistentry>
223 <term><option>dump</option></term>
224 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000225 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000226 Print the current catalog.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000227 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000228 </listitem>
229 </varlistentry>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000230
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000231 <varlistentry>
232 <term><option>debug</option></term>
233 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000234 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000235 Print debugging statements showing the steps
236 <application>xmlcatalog</application> is executing.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000237 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000238 </listitem>
239 </varlistentry>
240
241 <varlistentry>
242 <term><option>quiet</option></term>
243 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000244 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000245 Stop printing debugging statements.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000246 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000247 </listitem>
248 </varlistentry>
249
250 <varlistentry>
251 <term><option>exit</option></term>
252 <listitem>
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000253 <simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000254 Quit the shell.
MDT 2001 John Fleck0e229932001-10-07 22:46:00 +0000255 </simpara>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000256 </listitem>
257 </varlistentry>
258 </variablelist>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000259
260 </refsect1>
261
262
263 <refsect1 id="references">
264 <title>References</title>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000265 <variablelist>
266
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000267
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000268 <varlistentry>
269 <term>libxml web page:</term>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000270 <listitem>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000271 <simpara>
272 <ulink
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000273 url="http://www.xmlsoft.org/">http://www.xmlsoft.org/</ulink>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000274 </simpara>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000275 </listitem>
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000276 </varlistentry>
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000277
MDT 2001 John Fleckac941e32001-10-06 22:30:16 +0000278 <varlistentry>
279 <term><application>libxml</application> catalog support web page:</term>
280 <listitem>
281 <simpara>
282 <ulink url="http://www.xmlsoft.org/catalog.html">http://www.xmlsoft.org/catalog.html</ulink>
283 </simpara>
284 </listitem>
285 </varlistentry>
286
287
288 <varlistentry>
289 <term>James Clark's <acronym>SGML</acronym> catalog page:</term>
290 <listitem>
291 <simpara>
292 <ulink
293 url="http://www.jclark.com/sp/catalog.htm">http://www.jclark.com/sp/catalog.htm</ulink>
294 </simpara>
295 </listitem>
296 </varlistentry>
297
298 <varlistentry>
299 <term><acronym>OASIS</acronym> <acronym>XML</acronym> catalog specification:</term>
300 <listitem>
301 <simpara>
302 <ulink
303 url="http://www.oasis-open.org/committees/entity/spec.html">http://www.oasis-open.org/committees/entity/spec.html</ulink>
304 </simpara>
305 </listitem>
306 </varlistentry>
307 </variablelist>
308
MDT 2001 John Fleck5bd39dc2001-09-03 15:14:19 +0000309 </refsect1>
310
311</refentry>