xmlcatalog_man.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlcatalog</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2431614"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xmlcatalog &#8212; Command line tool to parse and manipulate <span class="acronym">XML</span> or
  2. <span class="acronym">SGML</span> catalog files.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xmlcatalog</tt> [[--shell] | [--create] | [--add <i class="replaceable"><tt>type</tt></i>
  3. <i class="replaceable"><tt>orig</tt></i> <i class="replaceable"><tt>replace</tt></i>] | [--del <i class="replaceable"><tt>values</tt></i>] | [--noout] | [--verbose]] [<tt class="option"><i class="replaceable"><tt>catalogfile</tt></i></tt>] [<tt class="option"><i class="replaceable"><tt>entities</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
  4. <span class="application">xmlcatalog</span> is a command line application
  5. allowing users to monitor and manipulate <span class="acronym">XML</span> and
  6. <span class="acronym">SGML</span> catalogs. It is included in
  7. <span class="application">libxml2</span>.
  8. </p><p>
  9. Its functions can be invoked from a single command from the command line,
  10. or it can perform multiple functions in interactive mode. It can operate
  11. on both <span class="acronym">XML</span> and <span class="acronym">SGML</span> files.
  12. </p></div><div class="refsect1" lang="en"><a name="cloptions"></a><h2>Command Line Options</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">--shell</tt> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
  13. Run a shell
  14. allowing interactive queries on catalog file
  15. <i class="replaceable"><tt>filename</tt></i>.
  16. </dd><dt><span class="term"><tt class="option">--create</tt> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
  17. Create a new
  18. <span class="acronym">XML</span> catalog. Outputs to stdout, ignoring
  19. <i class="replaceable"><tt>filename</tt></i> unless <tt class="option">--noout</tt> is
  20. used, in which case it creates a new catalog file
  21. <i class="replaceable"><tt>filename</tt></i>.
  22. </dd><dt><span class="term"><tt class="option">--add</tt> <i class="replaceable"><tt>'type'</tt></i> <i class="replaceable"><tt>'orig'</tt></i> <i class="replaceable"><tt>'replace'</tt></i> <i class="replaceable"><tt>filename</tt></i></span></dt><dd><p>
  23. Add an entry to catalog file
  24. <tt class="filename">filename</tt>. <i class="replaceable"><tt>type</tt></i>
  25. indicates the type of entry. Possible types are 'public', 'system',
  26. 'rewriteSystem', 'delegatePublic', 'delegateSystem'amd
  27. 'rewriteURI'. <i class="replaceable"><tt>'orig'</tt></i> is the original
  28. reference to be replaced, and <i class="replaceable"><tt>'replace'</tt></i>
  29. is the <span class="acronym">URI</span> of the replacement entity to be
  30. used. The <tt class="option">--add</tt> option will not overwrite
  31. <i class="replaceable"><tt>filename</tt></i>, outputing to stdout, unless
  32. <tt class="option">--noout</tt> is used. The <tt class="option">--add</tt> will
  33. always take three parameters even if some of the
  34. <span class="acronym">XML</span> catalog constructs will have only a single
  35. argument.
  36. </p><p>
  37. If the <tt class="option">--add</tt> option is used following the
  38. <tt class="option">--sgml</tt> option, only a single argument, a
  39. <i class="replaceable"><tt>filename</tt></i>, is used. This is used to add
  40. the name of a catalog file to an <span class="acronym">SGML</span>
  41. supercatalog, a file that contains references to other included
  42. <span class="acronym">SGML</span> catalog files.
  43. </p></dd><dt><span class="term"><tt class="option">--del</tt> <i class="replaceable"><tt>'values'</tt></i> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
  44. Remove entries from the catalog file
  45. <i class="replaceable"><tt>filename</tt></i> matching
  46. <i class="replaceable"><tt>'values'</tt></i>. The <tt class="option">--del</tt> option
  47. will not overwrite <i class="replaceable"><tt>filename</tt></i>, outputing to
  48. stdout, unless <tt class="option">--noout</tt> is used.
  49. </dd><dt><span class="term"><tt class="option">--noout</tt></span></dt><dd>
  50. Save output to the named file rather than
  51. outputing to stdout.
  52. </dd><dt><span class="term"><tt class="option">--sgml</tt></span></dt><dd>
  53. Uses SGML Super catalogs for --add and --del options
  54. </dd><dt><span class="term"><tt class="option">-v</tt> or <tt class="option">--verbose</tt></span></dt><dd>
  55. output debugging
  56. information.
  57. </dd></dl></div></div><div class="refsect1" lang="en"><a name="shell"></a><h2>Shell Commands</h2><p>Invoking <span class="application">xmlcatalog</span> with the
  58. <tt class="option">--shell</tt> <i class="replaceable"><tt>filename</tt></i> option opens
  59. a command line shell allowing interactive access to the catalog file
  60. identified by <i class="replaceable"><tt>filename</tt></i>. Invoking the shell
  61. provides a command line prompt after which commands can be entered.
  62. </p><div class="variablelist"><dl><dt><span class="term"><tt class="option">public</tt> <i class="replaceable"><tt>'PublicID'</tt></i></span></dt><dd>
  63. Execute a
  64. public identifier lookup of the catalog entry for
  65. <i class="replaceable"><tt>'PublicID'</tt></i>. The corresponding entry will be
  66. output to the command line.
  67. </dd><dt><span class="term"><tt class="option">system</tt> <i class="replaceable"><tt>'SystemID'</tt></i></span></dt><dd>
  68. Execute a
  69. public identifier lookup of the catalog entry for
  70. <i class="replaceable"><tt>'SystemID'</tt></i>. The corresponding entry will be
  71. output to the command line.
  72. </dd><dt><span class="term"><tt class="option">add </tt> <i class="replaceable"><tt>'type'</tt></i> <i class="replaceable"><tt>'orig'</tt></i> <i class="replaceable"><tt>'replace'</tt></i></span></dt><dd>
  73. Add an entry to the catalog
  74. file. <i class="replaceable"><tt>type</tt></i> indicates the type of
  75. entry. Possible types are 'public', 'system', 'rewriteSystem',
  76. 'delegatePublic' and 'delegateSystem'. <i class="replaceable"><tt>'orig'</tt></i>
  77. is the original reference to be replaced, and
  78. <i class="replaceable"><tt>'replace'</tt></i> is the <span class="acronym">URI</span> of the
  79. replacement entity to be used.
  80. </dd><dt><span class="term"><tt class="option">del</tt> <i class="replaceable"><tt>'values'</tt></i></span></dt><dd>
  81. Remove the
  82. catalog entry corresponding to <i class="replaceable"><tt>'values'</tt></i>.
  83. </dd><dt><span class="term"><tt class="option">dump</tt></span></dt><dd>
  84. Print the current catalog.
  85. </dd><dt><span class="term"><tt class="option">debug</tt></span></dt><dd>
  86. Print debugging statements showing the steps
  87. <span class="application">xmlcatalog</span> is executing.
  88. </dd><dt><span class="term"><tt class="option">quiet</tt></span></dt><dd>
  89. Stop printing debugging statements.
  90. </dd><dt><span class="term"><tt class="option">exit</tt></span></dt><dd>
  91. Quit the shell.
  92. </dd></dl></div></div><div class="refsect1" lang="en"><a name="return"></a><h2>Return values</h2><p><span class="application">xmlcatalog</span>'s return codes provide
  93. information that can be used when calling it from scripts.</p><p>0: normal</p><p>1: Failed to remove an entry from the catalog</p><p>2: Failed to save to the catalog, check file permissions</p><p>3: Failed to add an entry to the catalog</p><p>4: Failed to lookup and entry in the catalog</p></div><div class="refsect1" lang="en"><h2>Catalogs</h2><p>Catalog behavior can be changed by redirecting
  94. queries to the user's own set of catalogs. This can be done by setting the
  95. <tt class="varname">XML_CATALOG_FILES</tt> environment variable to a list of
  96. catalogs. An empty one should deactivate loading the default
  97. <tt class="filename">/etc/xml/catalog</tt> default catalog.</p></div><div class="refsect1" lang="en"><h2>References</h2><p><a href="http://www.xmlsoft.org/" target="_top">libxml web page</a></p><p><a href="http://www.xmlsoft.org/catalog.html" target="_top"><span class="application">libxml</span>
  98. catalog support web page:</a></p><p><a href="http://www.jclark.com/sp/catalog.htm" target="_top">James Clark's
  99. <span class="acronym">SGML</span> catalog page:</a></p><p><a href="http://www.oasis-open.org/committees/entity/spec.html" target="_top"><span class="acronym">OASIS</span>
  100. <span class="acronym">XML</span> catalog specification: </a></p></div></div></body></html>