Home | History | Annotate | Download | only in doc
      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 Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="idm45940765506544"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xmlcatalog &#8212; 
      2 		Command line tool to parse and manipulate <acronym class="acronym">XML</acronym>
      3 		or <acronym class="acronym">SGML</acronym> catalog files.
      4 	</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xmlcatalog</code>  [ <code class="option">--sgml</code>  |   <code class="option">--shell</code>  |   <code class="option">--create</code>  |   <code class="option">--del <em class="replaceable"><code>VALUE(S)</code></em></code>  |   
      5 			[ 
      6 					<code class="option">--add
      7 					 <em class="replaceable"><code>TYPE</code></em>
      8 					 <em class="replaceable"><code>ORIG</code></em>
      9 					 <em class="replaceable"><code>REPLACE</code></em>
     10 					</code>
     11 				  |   <code class="option">--add <em class="replaceable"><code>FILENAME</code></em></code> ]		
     12 		  |   <code class="option">--noout</code>  |   <code class="option">--no-super-update</code>  |   
     13 			[ <code class="option">-v</code>  |   <code class="option">--verbose</code> ]
     14 		 ] {<em class="replaceable"><code>CATALOGFILE</code></em>} {<em class="replaceable"><code>ENTITIES</code></em>...}</p></div></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p>
     15 		<span class="command"><strong>xmlcatalog</strong></span> is a command line application allowing users to monitor and
     16 		manipulate <acronym class="acronym">XML</acronym> and <acronym class="acronym">SGML</acronym> catalogs. It
     17 		is included in <span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span>.
     18 	</p><p>
     19 		Its functions can be invoked from a single command from the command line,
     20 		or it can perform multiple functions in interactive mode. It can operate
     21 		on both <acronym class="acronym">XML</acronym> and <acronym class="acronym">SGML</acronym> files.
     22 	</p></div><div class="refsect1"><a name="options"></a><h2>OPTIONS</h2><p>
     23 		<span class="command"><strong>xmlcatalog</strong></span> accepts the following options (in alphabetical order):
     24 	</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
     25 		<code class="option">--add
     26 		 <em class="replaceable"><code>TYPE</code></em>
     27 		 <em class="replaceable"><code>ORIG</code></em>
     28 		 <em class="replaceable"><code>REPLACE</code></em>
     29 		</code>
     30 	</span></dt><dd><p>
     31 			Add an entry to <code class="filename">CATALOGFILE</code>. <em class="replaceable"><code>TYPE</code></em>
     32 			indicates the type of entry. Possible types are: <span class="simplelist"><em class="parameter"><code>public</code></em>, <em class="parameter"><code>system</code></em>, <em class="parameter"><code>uri</code></em>, <em class="parameter"><code>rewriteSystem</code></em>, <em class="parameter"><code>rewriteURI</code></em>, <em class="parameter"><code>delegatePublic</code></em>, <em class="parameter"><code>delegateSystem</code></em>, <em class="parameter"><code>delegateURI</code></em>, <em class="parameter"><code>nextCatalog</code></em></span>. <em class="replaceable"><code>ORIG</code></em> is the original
     33 			reference to be replaced, and <em class="replaceable"><code>REPLACE</code></em>
     34 			is the <acronym class="acronym">URI</acronym> of the replacement entity to be
     35 			used. The <code class="option">--add</code> option will not overwrite
     36 			<code class="filename">CATALOGFILE</code>, outputting
     37 			to <code class="filename">stdout</code>, unless
     38 			<code class="option">--noout</code> is used. The <code class="option">--add</code> will
     39 			always take three parameters even if some of the <acronym class="acronym">XML</acronym>
     40 			catalog constructs will have only a single argument.
     41 		</p></dd><dt><span class="term"><code class="option">--add <em class="replaceable"><code>FILENAME</code></em></code></span></dt><dd><p>
     42 			If the <code class="option">--add</code> option is used following
     43 			the <code class="option">--sgml</code> option, only a single argument,
     44 			a <em class="replaceable"><code>FILENAME</code></em>, is used. This is used to add
     45 			the name of a catalog file to an <acronym class="acronym">SGML</acronym> supercatalog,
     46 			a file that contains references to other included <acronym class="acronym">SGML</acronym>
     47 			catalog files.
     48 		</p></dd><dt><span class="term"><code class="option">--create</code></span></dt><dd><p>
     49 			Create a new <acronym class="acronym">XML</acronym> catalog. Outputs
     50 			to <code class="filename">stdout</code>,
     51 			ignoring <em class="replaceable"><code>filename</code></em> unless <code class="option">--noout</code> is
     52 			used, in which case it creates a new catalog
     53 			file <em class="replaceable"><code>filename</code></em>.
     54 		</p></dd><dt><span class="term"><code class="option">--del <em class="replaceable"><code>VALUE(S)</code></em></code></span></dt><dd><p>
     55 			Remove entries from <em class="replaceable"><code>CATALOGFILE</code></em>
     56 			matching <em class="replaceable"><code>VALUE(S)</code></em>. The <code class="option">--del</code>
     57 			option will not overwrite <em class="replaceable"><code>CATALOGFILE</code></em>,
     58 			outputting to <code class="filename">stdout</code>,
     59 			unless <code class="option">--noout</code> is used.
     60 		</p></dd><dt><span class="term"><code class="option">--noout</code></span></dt><dd><p>
     61 			Save output to the named file rather than outputting
     62 			to <code class="filename">stdout</code>.
     63 		</p></dd><dt><span class="term"><code class="option">--no-super-update</code></span></dt><dd><p>
     64 			Do not update the <acronym class="acronym">SGML</acronym> super catalog.
     65 		</p></dd><dt><span class="term"><code class="option">--shell</code></span></dt><dd><p>
     66 			Run a shell allowing interactive queries on catalog
     67 			file <em class="replaceable"><code>CATALOGFILE</code></em>. For the set of available
     68 			commands see <a class="xref" href="#shell" title="SHELL COMMANDS">the section called &#8220;SHELL COMMANDS&#8221;</a>.
     69 		</p></dd><dt><span class="term"><code class="option">--sgml</code></span></dt><dd><p>
     70 			Uses <acronym class="acronym">SGML</acronym> super catalogs for <code class="option">--add</code>
     71 			and <code class="option">--del</code> options.
     72 		</p></dd><dt><span class="term"><code class="option">-v</code>, </span><span class="term"><code class="option">--verbose</code></span></dt><dd><p>Output debugging information.</p></dd></dl></div><p>
     73 		Invoking <span class="command"><strong>xmlcatalog</strong></span> non-interactively without a designated action
     74 		(imposed with options like <code class="option">--add</code>) will result in a lookup
     75 		of the catalog entry for <em class="replaceable"><code>ENTITIES</code></em> in the
     76 		catalog denoted with <em class="replaceable"><code>CATALOGFILE</code></em>. The
     77 		corresponding entries will be output to the command line. This mode of
     78 		operation, together with <code class="option">--shell</code> mode and non-modifying
     79 		(i.e. without <code class="option">--noout</code>) direct actions, allows for
     80 		a special shortcut of the void <em class="replaceable"><code>CATALOGFILE</code></em>
     81 		specification (possibly expressed as "" in the shell
     82 		environment) appointing the default system catalog. That simplifies the
     83 		handling when its exact location is irrelevant but the respective built-in
     84 		still needs to be consulted.
     85 	</p></div><div class="refsect1"><a name="shell"></a><h2>SHELL COMMANDS</h2><p>
     86 		Invoking <span class="command"><strong>xmlcatalog</strong></span> with
     87 		the <code class="option">--shell <em class="replaceable"><code>CATALOGFILE</code></em></code> option opens
     88 		a command line shell allowing interactive access to the catalog file
     89 		identified by <em class="replaceable"><code>CATALOGFILE</code></em>. Invoking the shell
     90 		provides a command line prompt after which the following commands (described in
     91 		alphabetical order) can be entered.
     92 	</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
     93 		<code class="option">add
     94 		 <em class="replaceable"><code>TYPE</code></em>
     95 		 <em class="replaceable"><code>ORIG</code></em>
     96 		 <em class="replaceable"><code>REPLACE</code></em>
     97 		</code>
     98 	</span></dt><dd><p>
     99 			Add an entry to the catalog file. <em class="replaceable"><code>TYPE</code></em>
    100 			indicates the type of entry. Possible types are: <span class="simplelist"><em class="parameter"><code>public</code></em>, <em class="parameter"><code>system</code></em>, <em class="parameter"><code>uri</code></em>, <em class="parameter"><code>rewriteSystem</code></em>, <em class="parameter"><code>rewriteURI</code></em>, <em class="parameter"><code>delegatePublic</code></em>, <em class="parameter"><code>delegateSystem</code></em>, <em class="parameter"><code>delegateURI</code></em>, <em class="parameter"><code>nextCatalog</code></em></span>. <em class="replaceable"><code>ORIG</code></em> is the original
    101 			reference to be replaced, and <em class="replaceable"><code>REPLACE</code></em>
    102 			is the <acronym class="acronym">URI</acronym> of the replacement entity to be
    103 			used. The <code class="option">--add</code> option will not overwrite
    104 			<code class="filename">CATALOGFILE</code>, outputting
    105 			to <code class="filename">stdout</code>, unless
    106 			<code class="option">--noout</code> is used. The <code class="option">--add</code> will
    107 			always take three parameters even if some of the <acronym class="acronym">XML</acronym>
    108 			catalog constructs will have only a single argument.
    109 		</p></dd><dt><span class="term"><code class="option">debug</code></span></dt><dd><p>
    110 			Print debugging statements showing the steps <span class="command"><strong>xmlcatalog</strong></span> is executing.
    111 		</p></dd><dt><span class="term"><code class="option">del <em class="replaceable"><code>VALUE(S)</code></em></code></span></dt><dd><p>
    112 			Remove the catalog entry corresponding to <em class="replaceable"><code>VALUE(S)</code></em>.
    113 		</p></dd><dt><span class="term"><code class="option">dump</code></span></dt><dd><p>Print the current catalog.</p></dd><dt><span class="term"><code class="option">exit</code></span></dt><dd><p>Quit the shell.</p></dd><dt><span class="term"><code class="option">public <em class="replaceable"><code>PUBLIC-ID</code></em></code></span></dt><dd><p>
    114 			Execute a Formal Public Identifier lookup of the catalog entry
    115 			for <em class="replaceable"><code>PUBLIC-ID</code></em>. The corresponding entry will be
    116 			output to the command line.
    117 		</p></dd><dt><span class="term"><code class="option">quiet</code></span></dt><dd><p>Stop printing debugging statements.</p></dd><dt><span class="term"><code class="option">system <em class="replaceable"><code>SYSTEM-ID</code></em></code></span></dt><dd><p>
    118 			Execute a Formal Public Identifier lookup of the catalog entry
    119 			for <em class="replaceable"><code>SYSTEM-ID</code></em>. The corresponding entry will be
    120 			output to the command line.
    121 		</p></dd></dl></div></div><div class="refsect1"><a name="environment"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">XML_CATALOG_FILES</code></span></dt><dd><p><acronym class="acronym">XML</acronym> catalog behavior can be changed by redirecting
    122 			queries to the user's own set of catalogs. This can be done by setting
    123 			the <code class="envar">XML_CATALOG_FILES</code> environment variable to a list
    124 			of catalogs. An empty one should deactivate loading the
    125 			default <code class="filename">/etc/xml/catalog</code> catalog.
    126 		</p></dd></dl></div></div><div class="refsect1"><a name="diagnostics"></a><h2>DIAGNOSTICS</h2><p>
    127 		<span class="command"><strong>xmlcatalog</strong></span> return codes provide information that can be used when
    128 		calling it from scripts.
    129 	</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">0</span></span></dt><dd><p>No error</p></dd><dt><span class="term"><span class="errorcode">1</span></span></dt><dd><p>Failed to remove an entry from the catalog</p></dd><dt><span class="term"><span class="errorcode">2</span></span></dt><dd><p>Failed to save to the catalog, check file permissions</p></dd><dt><span class="term"><span class="errorcode">3</span></span></dt><dd><p>Failed to add an entry to the catalog</p></dd><dt><span class="term"><span class="errorcode">4</span></span></dt><dd><p>Failed to look up an entry in the catalog</p></dd></dl></div></div><div class="refsect1"><a name="seealso"></a><h2>SEE ALSO</h2><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span>
    130 	</p><p>
    131 		More information can be found at
    132 		</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span> web page <a class="ulink" href="http://www.xmlsoft.org/" target="_top">http://www.xmlsoft.org/</a>
    133 				</p></li><li class="listitem"><p><span class="citerefentry"><span class="refentrytitle">libxml</span>(3)</span> catalog support web page
    134 					at <a class="ulink" href="http://www.xmlsoft.org/catalog.html" target="_top">http://www.xmlsoft.org/catalog.html</a>
    135 				</p></li><li class="listitem"><p>James Clark's <acronym class="acronym">SGML</acronym> catalog
    136 					page <a class="ulink" href="http://www.jclark.com/sp/catalog.htm" target="_top">http://www.jclark.com/sp/catalog.htm</a>
    137 				</p></li><li class="listitem"><p><acronym class="acronym">OASIS</acronym> <acronym class="acronym">XML</acronym> catalog specification
    138 					<a class="ulink" href="http://www.oasis-open.org/committees/entity/spec.html" target="_top">http://www.oasis-open.org/committees/entity/spec.html</a>
    139 				</p></li></ul></div><p>
    140 	</p></div></div></body></html>
    141