Minor tweaks to man page
[metaproxy-moved-to-github.git] / doc / metaproxy.xml
index 6c68f9c..9fec716 100644 (file)
@@ -1,29 +1,47 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
- <!ENTITY % common SYSTEM "common/common.ent">
-     %common;
+ <!ENTITY % local SYSTEM "local.ent">
+     %local;
+ <!ENTITY % idcommon SYSTEM "common/common.ent">
+     %idcommon;
 ]>
-<!-- $Id: metaproxy.xml,v 1.7 2007-05-09 21:23:08 adam Exp $ -->
 <refentry id="ref-metaproxy">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>metaproxy</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
+
  <refnamediv>
   <refname>metaproxy</refname>
-  <refpurpose>Metaproxy - daemon</refpurpose>
+  <refpurpose>Metaproxy - server</refpurpose>
  </refnamediv>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>metaproxy</command>
    <arg choice="opt"><option>--help</option></arg>
+   <arg choice="opt"><option>--version</option></arg>
+   <arg choice="opt"><option>-v <replaceable>loglevel</replaceable></option></arg>
    <arg choice="opt"><option>--config <replaceable>config</replaceable></option></arg>
+   <arg choice="opt"><option>-D</option></arg>
+   <arg choice="opt"><option>-l <replaceable>logfile</replaceable></option></arg>
+   <arg choice="opt"><option>-m <replaceable>timeformat</replaceable></option></arg>
+   <arg choice="opt"><option>-p <replaceable>pidfile</replaceable></option></arg>
+   <arg choice="opt"><option>-t</option></arg>
+   <arg choice="opt"><option>-u <replaceable>ID</replaceable></option></arg>
+   <arg choice="opt"><option>-w <replaceable>dir</replaceable></option></arg>
+   <arg choice="opt"><option>-X</option></arg>
   </cmdsynopsis>
  </refsynopsisdiv>
+
  <refsect1><title>DESCRIPTION</title>
 
   <para>
   </para>
 
  </refsect1>
+
  <refsect1><title>OPTIONS</title>
-  
+
   <variablelist>
    <varlistentry>
     <term>--help</term>
     <listitem><para>
-      Displays help message.
+      Display help message.
      </para></listitem>
    </varlistentry>
 
    <varlistentry>
+    <term>--version</term>
+    <listitem><para>
+      Display Metaproxy version.
+     </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-v <replaceable>loglevel</replaceable></term>
+    <listitem><para>
+     Specify YAZ log level (all, debug, log)
+    </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
     <term>--config <replaceable>config</replaceable></term>
     <listitem><para>
       Specify the configuration.
      </para></listitem>
    </varlistentry>
 
+   <varlistentry>
+    <term>-D</term>
+    <listitem><para>
+      Puts Metaproxy in the background after startup.
+     </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-l <replaceable>logfile</replaceable></term>
+    <listitem><para>
+      Specifies YAZ log file.
+     </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-m <replaceable>timeformat</replaceable></term>
+    <listitem><para>
+     Set the format of time-stamps for all logging performed via yaz_log.
+     Refer to
+       <ulink
+          url="http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html">
+       strftime(3)</ulink>
+       man page for the format.
+    </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-p <replaceable>pidfile</replaceable></term>
+    <listitem><para>
+      Specify file which holds PID after startup.
+     </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-t</term>
+    <listitem><para>
+      Test configuration. Returns exit code 0 on success; non-zero on failure.
+     </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-u <replaceable>ID</replaceable></term>
+    <listitem><para>
+      Change user ID upon startup.
+     </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-w <replaceable>dir</replaceable></term>
+    <listitem><para>
+      Change working directory to <replaceable>dir</replaceable>.
+     </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term>-X</term>
+    <listitem><para>
+      Operate in debug mode.
+     </para></listitem>
+   </varlistentry>
+
   </variablelist>
  </refsect1>
 
+ <refsect1><title>CONFIGURATION</title>
+   <para>Metaproxy's configuration is XML based. All elements
+     should be in namespace <literal>http://indexdata.com/metaproxy</literal>.
+   </para>
+   <para>
+     The root element must be named <literal>metaproxy</literal> and
+     must specify a version. Currently the version must be
+     <literal>1.0</literal>. The children elements of metaproxy
+     are:
+     <variablelist>
+       <varlistentry>
+        <term>dlpath</term>
+        <listitem>
+          <para>
+            Specifies the path for Loadable filter modules
+          </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term>start</term>
+        <listitem>
+          <para>
+            Specifies the start route. Takes a <literal>route</literal>
+            attribute with the name of the route.
+          </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term>filters</term>
+        <listitem>
+          <para>
+            Specifies all filters. Includes one ore more
+            <literal>filter</literal> elements with filter-specific
+            configuration material.
+          </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term>routes</term>
+        <listitem>
+          <para>
+            Specifies all routes. Includes one or more
+            <literal>route</literal> elements. Each <literal>route</literal>
+            in turn includes one or more filter specifications.
+          </para>
+        </listitem>
+       </varlistentry>
+     </variablelist>
+   </para>
+   <para>
+     The configuration is described in more detail in the
+     <ulink url="&url.metaproxy.doc;">Metaproxy manual</ulink>.
+   </para>
+ </refsect1>
  <refsect1><title>EXAMPLES</title>
-  <para>
-   Start server with configuration in <filename>my.xml</filename>.
-   <screen>
-    metaproxy --config my.xml
+   <para>
+     The configuration below specifies a simple Z39.50 proxy and
+     illustrates most configuration elements of Metaproxy.
+   </para>
+   <screen><![CDATA[
+<?xml version="1.0"?>
+<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
+  <dlpath>/usr/local/metaproxy/filters</dlpath>
+  <start route="start"/>
+  <filters>
+    <filter id="frontend" type="frontend_net">
+      <threads>10</threads>
+      <port>@:9000</port>
+    </filter>
+    <filter id="backend" type="z3950_client">
+     <timeout>30</timeout>
+     <default_target>z3950.indexdata.com</default_target>
+    </filter>
+  </filters>
+  <routes>
+    <route id="start">
+      <filter refid="frontend"/>
+      <filter type="log">
+        <message>log</message>
+      </filter>
+      <filter refid="backend"/>
+      <filter type="bounce"/>
+    </route>
+  </routes>
+</metaproxy>
+]]>
    </screen>
-  </para>
- </refsect1> 
+   <para>
+     Start server with configuration in <filename>my.xml</filename>.
+     <screen>
+       metaproxy --config my.xml
+     </screen>
+   </para>
+ </refsect1>
+
+ <refsect1><title>SCHEMA</title>
+   <literallayout><xi:include
+                    xi:href="../xml/schema/metaproxy.rnc"
+                    xi:parse="text"
+                    xmlns:xi="http://www.w3.org/2001/XInclude" />
+   </literallayout>
+ </refsect1>
 
  <refsect1><title>FILES</title>
   <para>
   </para>
   <para>
    The Metaproxy
-   <ulink url="http://www.indexdata.com/metaproxy/doc/">manual</ulink>.
+   <ulink url="&url.metaproxy.doc;">manual</ulink>.
   </para>
  </refsect1>
 
 
 <!-- Keep this comment at the end of the file
 Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:1
-sgml-indent-data:t
-sgml-parent-document:nil
-sgml-local-catalogs: nil
-sgml-namecase-general:t
+mode: nxml
+nxml-child-indent: 1
 End:
 -->