MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 1 | <?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 Fleck | 3fc555e | 2001-12-11 04:41:24 +0000 | [diff] [blame] | 16 | |
| 17 | <releaseinfo>This is release 0.2 of the xmlcatalog Manual.</releaseinfo> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 18 | </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 Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 65 | <variablelist> |
| 66 | <varlistentry> |
| 67 | <term><option>--shell</option> <replaceable>filename</replaceable></term> |
| 68 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 69 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 70 | Run a shell |
| 71 | allowing interactive queries on catalog file |
| 72 | <replaceable>filename</replaceable>. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 73 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 74 | </listitem> |
| 75 | </varlistentry> |
| 76 | <varlistentry> |
| 77 | <term><option>--create</option> <replaceable>filename</replaceable></term> |
| 78 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 79 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 80 | 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 Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 85 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 86 | </listitem> |
| 87 | </varlistentry> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 88 | |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 89 | <varlistentry> |
| 90 | <term><option>--add</option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable> <replaceable>filename</replaceable></term> |
| 91 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 92 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 93 | 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 Fleck | 60416fa | 2001-10-09 02:41:50 +0000 | [diff] [blame] | 100 | <option>--add</option> option will not overwrite |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 101 | <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 Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 105 | <!-- |
| 106 | FIXME - Is my list of possible types correct? Are SGML types the same? |
| 107 | --> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 108 | </simpara> |
MDT 2001 John Fleck | 60416fa | 2001-10-09 02:41:50 +0000 | [diff] [blame] | 109 | <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 Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 117 | </listitem> |
| 118 | </varlistentry> |
| 119 | <varlistentry> |
| 120 | <term><option>--del</option> <replaceable>'values'</replaceable> <replaceable>filename</replaceable></term> |
| 121 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 122 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 123 | 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 Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 128 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 129 | </listitem> |
| 130 | </varlistentry> |
| 131 | <varlistentry> |
| 132 | <term><option>--noout</option></term> |
| 133 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 134 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 135 | Save output to the named file rather than |
| 136 | outputing to stdout. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 137 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 138 | </listitem> |
| 139 | </varlistentry> |
| 140 | <varlistentry> |
Daniel Veillard | 0351754 | 2002-02-11 13:54:40 +0000 | [diff] [blame] | 141 | <term><option>--sgml</option></term> |
| 142 | <listitem> |
| 143 | <simpara> |
| 144 | Uses SGML Super catalogs for --add and --del options |
| 145 | </simpara> |
| 146 | </listitem> |
| 147 | </varlistentry> |
| 148 | <varlistentry> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 149 | <term><option>-v</option> or <option>--verbose</option></term> |
| 150 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 151 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 152 | output debugging |
| 153 | information. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 154 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 155 | </listitem> |
| 156 | </varlistentry> |
| 157 | </variablelist> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 158 | </refsect1> |
| 159 | |
| 160 | <refsect1 id="shell"> |
| 161 | <title>Shell Commands</title> |
| 162 | <para>Invoking <application>xmlcatalog</application> with the |
| 163 | <option>--shell</option> <replaceable>filename</replaceable> option opens |
| 164 | a command line shell allowing interactive access to the catalog file |
| 165 | identified by <replaceable>filename</replaceable>. Invoking the shell |
| 166 | provides a command line prompt after which commands can be entered. |
| 167 | </para> |
| 168 | |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 169 | <variablelist> |
| 170 | <varlistentry> |
| 171 | <term><option>public</option> <replaceable>'PublicID'</replaceable></term> |
| 172 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 173 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 174 | Execute a |
| 175 | public identifier lookup of the catalog entry for |
| 176 | <replaceable>'PublicID'</replaceable>. The corresponding entry will be |
| 177 | output to the command line. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 178 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 179 | </listitem> |
| 180 | </varlistentry> |
| 181 | |
| 182 | <varlistentry> |
| 183 | <term><option>system</option> <replaceable>'SystemID'</replaceable></term> |
| 184 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 185 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 186 | Execute a |
| 187 | public identifier lookup of the catalog entry for |
| 188 | <replaceable>'SystemID'</replaceable>. The corresponding entry will be |
| 189 | output to the command line. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 190 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 191 | </listitem> |
| 192 | </varlistentry> |
| 193 | <varlistentry> |
| 194 | <term><option>add </option> <replaceable>'type'</replaceable> <replaceable>'orig'</replaceable> <replaceable>'replace'</replaceable></term> |
| 195 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 196 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 197 | Add an entry to the catalog |
| 198 | file. <replaceable>type</replaceable> indicates the type of |
| 199 | entry. Possible types are 'public', 'system', 'rewriteSystem', |
| 200 | 'delegatePublic' and 'delegateSystem'. <replaceable>'orig'</replaceable> |
| 201 | is the original reference to be replaced, and |
| 202 | <replaceable>'replace'</replaceable> is the <acronym>URI</acronym> of the |
| 203 | replacement entity to be used. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 204 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 205 | </listitem> |
| 206 | </varlistentry> |
| 207 | <varlistentry> |
| 208 | <term><option>del</option> <replaceable>'values'</replaceable></term> |
| 209 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 210 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 211 | Remove the |
| 212 | catalog entry corresponding to <replaceable>'values'</replaceable>. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 213 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 214 | </listitem> |
| 215 | </varlistentry> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 216 | |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 217 | <varlistentry> |
| 218 | <term><option>dump</option></term> |
| 219 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 220 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 221 | Print the current catalog. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 222 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 223 | </listitem> |
| 224 | </varlistentry> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 225 | |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 226 | <varlistentry> |
| 227 | <term><option>debug</option></term> |
| 228 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 229 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 230 | Print debugging statements showing the steps |
| 231 | <application>xmlcatalog</application> is executing. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 232 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 233 | </listitem> |
| 234 | </varlistentry> |
| 235 | |
| 236 | <varlistentry> |
| 237 | <term><option>quiet</option></term> |
| 238 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 239 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 240 | Stop printing debugging statements. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 241 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 242 | </listitem> |
| 243 | </varlistentry> |
| 244 | |
| 245 | <varlistentry> |
| 246 | <term><option>exit</option></term> |
| 247 | <listitem> |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 248 | <simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 249 | Quit the shell. |
MDT 2001 John Fleck | 0e22993 | 2001-10-07 22:46:00 +0000 | [diff] [blame] | 250 | </simpara> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 251 | </listitem> |
| 252 | </varlistentry> |
| 253 | </variablelist> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 254 | |
| 255 | </refsect1> |
| 256 | |
Daniel Veillard | 0f5f162 | 2002-01-20 12:42:06 +0000 | [diff] [blame] | 257 | <refsect1 id="return"> |
| 258 | <title>Return values</title> |
| 259 | <para><application>xmlcatalog</application>'s return codes provide |
| 260 | information that can be used when calling it from scripts.</para> |
| 261 | |
| 262 | <para>0: normal</para> |
| 263 | <para>1: Failed to remove an entry from the catalog</para> |
| 264 | <para>2: Failed to save to the catalog, check file permissions</para> |
| 265 | <para>3: Failed to add an entry to the catalog</para> |
| 266 | <para>4: Failed to lookup and entry in the catalog</para> |
| 267 | </refsect1> |
| 268 | |
MST 2001 John Fleck | 3fc555e | 2001-12-11 04:41:24 +0000 | [diff] [blame] | 269 | <refsect1> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 270 | <title>References</title> |
MST 2001 John Fleck | 3fc555e | 2001-12-11 04:41:24 +0000 | [diff] [blame] | 271 | <para><ulink url="http://www.xmlsoft.org/">libxml web page</ulink></para> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 272 | |
MST 2001 John Fleck | 3fc555e | 2001-12-11 04:41:24 +0000 | [diff] [blame] | 273 | <para><ulink url="http://www.xmlsoft.org/catalog.html"><application>libxml</application> |
| 274 | catalog support web page:</ulink></para> |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 275 | |
MST 2001 John Fleck | 3fc555e | 2001-12-11 04:41:24 +0000 | [diff] [blame] | 276 | <para><ulink url="http://www.jclark.com/sp/catalog.htm">James Clark's |
| 277 | <acronym>SGML</acronym> catalog page:</ulink></para> |
| 278 | |
| 279 | <para><ulink |
| 280 | url="http://www.oasis-open.org/committees/entity/spec.html"><acronym>OASIS</acronym> |
| 281 | <acronym>XML</acronym> catalog specification: </ulink></para> |
| 282 | </refsect1> |
MDT 2001 John Fleck | ac941e3 | 2001-10-06 22:30:16 +0000 | [diff] [blame] | 283 | |
MDT 2001 John Fleck | 5bd39dc | 2001-09-03 15:14:19 +0000 | [diff] [blame] | 284 | |
Daniel Veillard | 0f5f162 | 2002-01-20 12:42:06 +0000 | [diff] [blame] | 285 | </refentry> |