xmlcatalog_man.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <?xml version="1.0"?>
  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" [
  6. <!ENTITY xmlcatalog "<command>xmlcatalog</command>">
  7. ]>
  8. <refentry>
  9. <refentryinfo>
  10. <title>xmlcatalog Manual</title>
  11. <productname>libxml2</productname>
  12. <copyright>
  13. <year>2001</year>
  14. <year>2004</year>
  15. </copyright>
  16. <author>
  17. <firstname>John</firstname>
  18. <surname>Fleck</surname>
  19. <affiliation>
  20. <address>
  21. <email>jfleck@inkstain.net</email>
  22. </address>
  23. </affiliation>
  24. </author>
  25. <!-- date should be the date of the latest change or the release version -->
  26. <date>$Date$</date>
  27. <!-- still a bit buggy output, will talk to docbook-xsl upstream to fix this -->
  28. <!-- <releaseinfo>This is release 0.3 of the xmlcatalog Manual.</releaseinfo> -->
  29. <!-- <edition>0.3</edition> -->
  30. </refentryinfo>
  31. <refmeta>
  32. <refentrytitle>xmlcatalog</refentrytitle>
  33. <manvolnum>1</manvolnum>
  34. </refmeta>
  35. <refnamediv>
  36. <refname>xmlcatalog</refname>
  37. <refpurpose>
  38. Command line tool to parse and manipulate <acronym>XML</acronym>
  39. or <acronym>SGML</acronym> catalog files.
  40. </refpurpose>
  41. </refnamediv>
  42. <refsynopsisdiv>
  43. <cmdsynopsis>
  44. <command>xmlcatalog</command>
  45. <group choice="opt">
  46. <arg choice="plain"><option>--sgml</option></arg>
  47. <arg choice="plain"><option>--shell</option></arg>
  48. <arg choice="plain"><option>--create</option></arg>
  49. <arg choice="plain"><option>--del <replaceable>VALUE(S)</replaceable></option></arg>
  50. <arg choice="plain">
  51. <group choice="opt">
  52. <arg choice="plain">
  53. <option>--add
  54. <replaceable>TYPE</replaceable>
  55. <replaceable>ORIG</replaceable>
  56. <replaceable>REPLACE</replaceable>
  57. </option>
  58. </arg>
  59. <arg choice="plain"><option>--add <replaceable>FILENAME</replaceable></option></arg>
  60. </group>
  61. </arg>
  62. <arg choice="plain"><option>--noout</option></arg>
  63. <arg choice="plain"><option>--no-super-update</option></arg>
  64. <arg choice="plain">
  65. <group choice="opt">
  66. <arg choice="plain"><option>-v</option></arg>
  67. <arg choice="plain"><option>--verbose</option></arg>
  68. </group>
  69. </arg>
  70. </group>
  71. <arg choice="req" rep="norepeat"><replaceable>CATALOGFILE</replaceable></arg>
  72. <arg choice="req" rep="repeat"><replaceable>ENTITIES</replaceable></arg>
  73. </cmdsynopsis>
  74. </refsynopsisdiv>
  75. <refsect1 id="description">
  76. <title>DESCRIPTION</title>
  77. <para>
  78. &xmlcatalog; is a command line application allowing users to monitor and
  79. manipulate <acronym>XML</acronym> and <acronym>SGML</acronym> catalogs. It
  80. is included in <citerefentry>
  81. <refentrytitle>libxml</refentrytitle>
  82. <manvolnum>3</manvolnum>
  83. </citerefentry>.
  84. </para>
  85. <para>
  86. Its functions can be invoked from a single command from the command line,
  87. or it can perform multiple functions in interactive mode. It can operate
  88. on both <acronym>XML</acronym> and <acronym>SGML</acronym> files.
  89. </para>
  90. </refsect1>
  91. <refsect1 id="options">
  92. <title>OPTIONS</title>
  93. <para>
  94. &xmlcatalog; accepts the following options (in alphabetical order):
  95. </para>
  96. <variablelist>
  97. <varlistentry>
  98. <term>
  99. <option>--add
  100. <replaceable>TYPE</replaceable>
  101. <replaceable>ORIG</replaceable>
  102. <replaceable>REPLACE</replaceable>
  103. </option>
  104. </term>
  105. <listitem>
  106. <para>
  107. Add an entry to <filename>CATALOGFILE</filename>. <replaceable>TYPE</replaceable>
  108. indicates the type of entry. Possible types are: <simplelist type="inline">
  109. <member><parameter>public</parameter></member>
  110. <member><parameter>system</parameter></member>
  111. <member><parameter>rewriteSystem</parameter></member>
  112. <member><parameter>rewriteURI</parameter></member>
  113. <member><parameter>delegatePublic</parameter></member>
  114. <member><parameter>delegateSystem</parameter></member>
  115. <member><parameter>nextCatalog</parameter></member>
  116. </simplelist>. <replaceable>ORIG</replaceable> is the original
  117. reference to be replaced, and <replaceable>REPLACE</replaceable>
  118. is the <acronym>URI</acronym> of the replacement entity to be
  119. used. The <option>--add</option> option will not overwrite
  120. <filename>CATALOGFILE</filename>, outputting
  121. to <filename class="devicefile">stdout</filename>, unless
  122. <option>--noout</option> is used. The <option>--add</option> will
  123. always take three parameters even if some of the <acronym>XML</acronym>
  124. catalog constructs will have only a single argument.
  125. </para>
  126. <!--
  127. FIXME - Is my list of possible types correct? Are SGML types the same?
  128. -->
  129. </listitem>
  130. </varlistentry>
  131. <varlistentry>
  132. <term><option>--add <replaceable>FILENAME</replaceable></option></term>
  133. <listitem>
  134. <para>
  135. If the <option>--add</option> option is used following
  136. the <option>--sgml</option> option, only a single argument,
  137. a <replaceable>FILENAME</replaceable>, is used. This is used to add
  138. the name of a catalog file to an <acronym>SGML</acronym> supercatalog,
  139. a file that contains references to other included <acronym>SGML</acronym>
  140. catalog files.
  141. </para>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry>
  145. <term><option>--create</option></term>
  146. <listitem>
  147. <para>
  148. Create a new <acronym>XML</acronym> catalog. Outputs
  149. to <filename class="devicefile">stdout</filename>,
  150. ignoring <replaceable>filename</replaceable> unless <option>--noout</option> is
  151. used, in which case it creates a new catalog
  152. file <replaceable>filename</replaceable>.
  153. </para>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry>
  157. <term><option>--del <replaceable>VALUE(S)</replaceable></option></term>
  158. <listitem>
  159. <para>
  160. Remove entries from <replaceable>CATALOGFILE</replaceable>
  161. matching <replaceable>VALUE(S)</replaceable>. The <option>--del</option>
  162. option will not overwrite <replaceable>CATALOGFILE</replaceable>,
  163. outputting to <filename class="devicefile">stdout</filename>,
  164. unless <option>--noout</option> is used.
  165. </para>
  166. </listitem>
  167. </varlistentry>
  168. <varlistentry>
  169. <term><option>--noout</option></term>
  170. <listitem>
  171. <para>
  172. Save output to the named file rather than outputting
  173. to <filename class="devicefile">stdout</filename>.
  174. </para>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry>
  178. <term><option>--no-super-update</option></term>
  179. <listitem>
  180. <para>
  181. Do not update the <acronym>SGML</acronym> super catalog.
  182. </para>
  183. </listitem>
  184. </varlistentry>
  185. <varlistentry>
  186. <term><option>--shell</option></term>
  187. <listitem>
  188. <para>
  189. Run a shell allowing interactive queries on catalog
  190. file <replaceable>CATALOGFILE</replaceable>. For the set of available
  191. commands see <xref linkend="shell"/>.
  192. </para>
  193. </listitem>
  194. </varlistentry>
  195. <varlistentry>
  196. <term><option>--sgml</option></term>
  197. <listitem>
  198. <para>
  199. Uses <acronym>SGML</acronym> super catalogs for <option>--add</option>
  200. and <option>--del</option> options.
  201. </para>
  202. </listitem>
  203. </varlistentry>
  204. <varlistentry>
  205. <term><option>-v</option></term>
  206. <term><option>--verbose</option></term>
  207. <listitem>
  208. <para>Output debugging information.</para>
  209. </listitem>
  210. </varlistentry>
  211. </variablelist>
  212. </refsect1>
  213. <refsect1 id="shell">
  214. <title>SHELL COMMANDS</title>
  215. <para>
  216. Invoking &xmlcatalog; with
  217. the <option>--shell <replaceable>CATALOGFILE</replaceable></option> option opens
  218. a command line shell allowing interactive access to the catalog file
  219. identified by <replaceable>CATALOGFILE</replaceable>. Invoking the shell
  220. provides a command line prompt after which the following commands (described in
  221. alphabetical order) can be entered.
  222. </para>
  223. <variablelist>
  224. <varlistentry>
  225. <term>
  226. <option>add
  227. <replaceable>TYPE</replaceable>
  228. <replaceable>ORIG</replaceable>
  229. <replaceable>REPLACE</replaceable>
  230. </option>
  231. </term>
  232. <listitem>
  233. <para>
  234. Add an entry to the catalog file. <replaceable>TYPE</replaceable>
  235. indicates the type of entry. Possible types are: <simplelist type="inline">
  236. <member><parameter>public</parameter></member>
  237. <member><parameter>system</parameter></member>
  238. <member><parameter>rewriteSystem</parameter></member>
  239. <member><parameter>rewriteURI</parameter></member>
  240. <member><parameter>delegatePublic</parameter></member>
  241. <member><parameter>delegateSystem</parameter></member>
  242. <member><parameter>nextCatalog</parameter></member>
  243. </simplelist>. <replaceable>ORIG</replaceable> is the original
  244. reference to be replaced, and <replaceable>REPLACE</replaceable>
  245. is the <acronym>URI</acronym> of the replacement entity to be
  246. used. The <option>--add</option> option will not overwrite
  247. <filename>CATALOGFILE</filename>, outputting
  248. to <filename class="devicefile">stdout</filename>, unless
  249. <option>--noout</option> is used. The <option>--add</option> will
  250. always take three parameters even if some of the <acronym>XML</acronym>
  251. catalog constructs will have only a single argument.
  252. </para>
  253. </listitem>
  254. </varlistentry>
  255. <varlistentry>
  256. <term><option>debug</option></term>
  257. <listitem>
  258. <para>
  259. Print debugging statements showing the steps &xmlcatalog; is executing.
  260. </para>
  261. </listitem>
  262. </varlistentry>
  263. <varlistentry>
  264. <term><option>del <replaceable>VALUE(S)</replaceable></option></term>
  265. <listitem>
  266. <para>
  267. Remove the catalog entry corresponding to <replaceable>VALUE(S)</replaceable>.
  268. </para>
  269. </listitem>
  270. </varlistentry>
  271. <varlistentry>
  272. <term><option>dump</option></term>
  273. <listitem>
  274. <para>Print the current catalog.</para>
  275. </listitem>
  276. </varlistentry>
  277. <varlistentry>
  278. <term><option>exit</option></term>
  279. <listitem>
  280. <para>Quit the shell.</para>
  281. </listitem>
  282. </varlistentry>
  283. <varlistentry>
  284. <term><option>public <replaceable>PUBLIC-ID</replaceable></option></term>
  285. <listitem>
  286. <para>
  287. Execute a Formal Public Identifier look-up of the catalog entry
  288. for <replaceable>PUBLIC-ID</replaceable>. The corresponding entry will be
  289. output to the command line.
  290. </para>
  291. </listitem>
  292. </varlistentry>
  293. <varlistentry>
  294. <term><option>quiet</option></term>
  295. <listitem>
  296. <para>Stop printing debugging statements.</para>
  297. </listitem>
  298. </varlistentry>
  299. <varlistentry>
  300. <term><option>system <replaceable>SYSTEM-ID</replaceable></option></term>
  301. <listitem>
  302. <para>
  303. Execute a Formal Public Identifier look-up of the catalog entry
  304. for <replaceable>SYSTEM-ID</replaceable>. The corresponding entry will be
  305. output to the command line.
  306. </para>
  307. </listitem>
  308. </varlistentry>
  309. </variablelist>
  310. </refsect1>
  311. <refsect1 id="environment">
  312. <title>ENVIRONMENT</title>
  313. <variablelist>
  314. <varlistentry>
  315. <term><envar>XML_CATALOG_FILES</envar></term>
  316. <listitem>
  317. <para><acronym>XML</acronym> catalog behavior can be changed by redirecting
  318. queries to the user's own set of catalogs. This can be done by setting
  319. the <envar>XML_CATALOG_FILES</envar> environment variable to a list
  320. of catalogs. An empty one should deactivate loading the
  321. default <filename>/etc/xml/catalog</filename> catalog.
  322. </para>
  323. </listitem>
  324. </varlistentry>
  325. </variablelist>
  326. </refsect1>
  327. <refsect1 id="diagnostics">
  328. <title>DIAGNOSTICS</title>
  329. <para>
  330. &xmlcatalog; return codes provide information that can be used when
  331. calling it from scripts.
  332. </para>
  333. <variablelist>
  334. <varlistentry>
  335. <term><errorcode>0</errorcode></term>
  336. <listitem>
  337. <para>No error</para>
  338. </listitem>
  339. </varlistentry>
  340. <varlistentry>
  341. <term><errorcode>1</errorcode></term>
  342. <listitem>
  343. <para>Failed to remove an entry from the catalog</para>
  344. </listitem>
  345. </varlistentry>
  346. <varlistentry>
  347. <term><errorcode>2</errorcode></term>
  348. <listitem>
  349. <para>Failed to save to the catalog, check file permissions</para>
  350. </listitem>
  351. </varlistentry>
  352. <varlistentry>
  353. <term><errorcode>3</errorcode></term>
  354. <listitem>
  355. <para>Failed to add an entry to the catalog</para>
  356. </listitem>
  357. </varlistentry>
  358. <varlistentry>
  359. <term><errorcode>4</errorcode></term>
  360. <listitem>
  361. <para>Failed to look up an entry in the catalog</para>
  362. </listitem>
  363. </varlistentry>
  364. </variablelist>
  365. </refsect1>
  366. <refsect1 id="seealso">
  367. <title>SEE ALSO</title>
  368. <para><citerefentry>
  369. <refentrytitle>libxml</refentrytitle>
  370. <manvolnum>3</manvolnum>
  371. </citerefentry>
  372. </para>
  373. <para>
  374. More information can be found at
  375. <itemizedlist>
  376. <listitem>
  377. <para><citerefentry>
  378. <refentrytitle>libxml</refentrytitle>
  379. <manvolnum>3</manvolnum>
  380. </citerefentry> web page <ulink url="http://www.xmlsoft.org/"/>
  381. </para>
  382. </listitem>
  383. <listitem>
  384. <para><citerefentry>
  385. <refentrytitle>libxml</refentrytitle>
  386. <manvolnum>3</manvolnum>
  387. </citerefentry> catalog support web page
  388. at <ulink url="http://www.xmlsoft.org/catalog.html"/>
  389. </para>
  390. </listitem>
  391. <listitem>
  392. <para>James Clark's <acronym>SGML</acronym> catalog
  393. page <ulink url="http://www.jclark.com/sp/catalog.htm"/>
  394. </para>
  395. </listitem>
  396. <listitem>
  397. <para><acronym>OASIS</acronym> <acronym>XML</acronym> catalog specification
  398. <ulink url="http://www.oasis-open.org/committees/entity/spec.html"/>
  399. </para>
  400. </listitem>
  401. </itemizedlist>
  402. </para>
  403. </refsect1>
  404. </refentry>