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>
17 <firstname>John
</firstname>
18 <surname>Fleck
</surname>
20 <address><email>jfleck@inkstain.net
</email></address>
22 <releaseinfo>This is release
0.3 of the xmlcatalog Manual.
</releaseinfo>
26 <refentrytitle>xmlcatalog
</refentrytitle>
27 <manvolnum>1</manvolnum>
30 <refname>xmlcatalog
</refname>
31 <refpurpose>Command line tool to parse and manipulate
<acronym>XML
</acronym> or
32 <acronym>SGML
</acronym> catalog files.
</refpurpose>
37 <command>xmlcatalog
</command>
41 <arg>--add
<replaceable>type
</replaceable>
42 <replaceable>orig
</replaceable> <replaceable>replace
</replaceable></arg>
43 <arg>--del
<replaceable>values
</replaceable></arg>
47 <arg><option><replaceable>catalogfile
</replaceable></option></arg>
48 <arg><option><replaceable>entities
</replaceable></option></arg>
52 <refsect1 id=
"introduction">
53 <title>Introduction
</title>
55 <application>xmlcatalog
</application> is a command line application
56 allowing users to monitor and manipulate
<acronym>XML
</acronym> and
57 <acronym>SGML
</acronym> catalogs. It is included in
58 <application>libxml2
</application>.
62 Its functions can be invoked from a single command from the command line,
63 or it can perform multiple functions in interactive mode. It can operate
64 on both
<acronym>XML
</acronym> and
<acronym>SGML
</acronym> files.
68 <refsect1 id=
"cloptions">
69 <title>Command Line Options
</title>
72 <term><option>--shell
</option> <replaceable>filename
</replaceable></term>
76 allowing interactive queries on catalog file
77 <replaceable>filename
</replaceable>.
82 <term><option>--create
</option> <replaceable>filename
</replaceable></term>
86 <acronym>XML
</acronym> catalog. Outputs to stdout, ignoring
87 <replaceable>filename
</replaceable> unless
<option>--noout
</option> is
88 used, in which case it creates a new catalog file
89 <replaceable>filename
</replaceable>.
95 <term><option>--add
</option> <replaceable>'type'
</replaceable> <replaceable>'orig'
</replaceable> <replaceable>'replace'
</replaceable> <replaceable>filename
</replaceable></term>
98 Add an entry to catalog file
99 <filename>filename
</filename>.
<replaceable>type
</replaceable>
100 indicates the type of entry. Possible types are 'public', 'system',
101 'rewriteSystem', 'rewriteURI', 'delegatePublic', 'delegateSystem',
102 and 'nextCatalog'.
<replaceable>'orig'
</replaceable> is the original
103 reference to be replaced, and
<replaceable>'replace'
</replaceable>
104 is the
<acronym>URI
</acronym> of the replacement entity to be
105 used. The
<option>--add
</option> option will not overwrite
106 <replaceable>filename
</replaceable>, outputting to stdout, unless
107 <option>--noout
</option> is used. The
<option>--add
</option> will
108 always take three parameters even if some of the
109 <acronym>XML
</acronym> catalog constructs will have only a single
112 FIXME - Is my list of possible types correct? Are SGML types the same?
116 If the
<option>--add
</option> option is used following the
117 <option>--sgml
</option> option, only a single argument, a
118 <replaceable>filename
</replaceable>, is used. This is used to add
119 the name of a catalog file to an
<acronym>SGML
</acronym>
120 supercatalog, a file that contains references to other included
121 <acronym>SGML
</acronym> catalog files.
126 <term><option>--del
</option> <replaceable>'values'
</replaceable> <replaceable>filename
</replaceable></term>
129 Remove entries from the catalog file
130 <replaceable>filename
</replaceable> matching
131 <replaceable>'values'
</replaceable>. The
<option>--del
</option> option
132 will not overwrite
<replaceable>filename
</replaceable>, outputting to
133 stdout, unless
<option>--noout
</option> is used.
138 <term><option>--noout
</option></term>
141 Save output to the named file rather than
142 outputting to stdout.
147 <term><option>--sgml
</option></term>
150 Uses SGML Super catalogs for --add and --del options
155 <term><option>-v
</option> or
<option>--verbose
</option></term>
166 <refsect1 id=
"shell">
167 <title>Shell Commands
</title>
168 <para>Invoking
<application>xmlcatalog
</application> with the
169 <option>--shell
</option> <replaceable>filename
</replaceable> option opens
170 a command line shell allowing interactive access to the catalog file
171 identified by
<replaceable>filename
</replaceable>. Invoking the shell
172 provides a command line prompt after which commands can be entered.
177 <term><option>public
</option> <replaceable>'PublicID'
</replaceable></term>
181 public identifier lookup of the catalog entry for
182 <replaceable>'PublicID'
</replaceable>. The corresponding entry will be
183 output to the command line.
189 <term><option>system
</option> <replaceable>'SystemID'
</replaceable></term>
193 public identifier lookup of the catalog entry for
194 <replaceable>'SystemID'
</replaceable>. The corresponding entry will be
195 output to the command line.
200 <term><option>add
</option> <replaceable>'type'
</replaceable> <replaceable>'orig'
</replaceable> <replaceable>'replace'
</replaceable></term>
203 Add an entry to the catalog
204 file.
<replaceable>type
</replaceable> indicates the type of
205 entry. Possible types are 'public', 'system', 'rewriteSystem',
206 'rewriteURI', 'delegatePublic', 'delegateSystem', and
207 'nextCatalog'.
<replaceable>'orig'
</replaceable>
208 is the original reference to be replaced, and
209 <replaceable>'replace'
</replaceable> is the
<acronym>URI
</acronym> of the
210 replacement entity to be used.
215 <term><option>del
</option> <replaceable>'values'
</replaceable></term>
219 catalog entry corresponding to
<replaceable>'values'
</replaceable>.
225 <term><option>dump
</option></term>
228 Print the current catalog.
234 <term><option>debug
</option></term>
237 Print debugging statements showing the steps
238 <application>xmlcatalog
</application> is executing.
244 <term><option>quiet
</option></term>
247 Stop printing debugging statements.
253 <term><option>exit
</option></term>
264 <refsect1 id=
"return">
265 <title>Return values
</title>
266 <para><application>xmlcatalog
</application>'s return codes provide
267 information that can be used when calling it from scripts.
</para>
269 <para>0: normal
</para>
270 <para>1: Failed to remove an entry from the catalog
</para>
271 <para>2: Failed to save to the catalog, check file permissions
</para>
272 <para>3: Failed to add an entry to the catalog
</para>
273 <para>4: Failed to lookup and entry in the catalog
</para>
276 <title>Catalogs
</title>
277 <para>Catalog behavior can be changed by redirecting
278 queries to the user's own set of catalogs. This can be done by setting the
279 <varname>XML_CATALOG_FILES
</varname> environment variable to a list of
280 catalogs. An empty one should deactivate loading the default
281 <filename>/etc/xml/catalog
</filename> default catalog.
</para>
284 <title>References
</title>
285 <para><ulink url=
"http://www.xmlsoft.org/">libxml web page
</ulink></para>
287 <para><ulink url=
"http://www.xmlsoft.org/catalog.html"><application>libxml
</application>
288 catalog support web page
</ulink></para>
290 <para><ulink url=
"http://www.jclark.com/sp/catalog.htm">James Clark's
291 <acronym>SGML
</acronym> catalog page
</ulink></para>
294 url=
"http://www.oasis-open.org/committees/entity/spec.html"><acronym>OASIS
</acronym>
295 <acronym>XML
</acronym> catalog specification
</ulink></para>