Extend nativesyntax description (with txml)
[pazpar2-moved-to-github.git] / doc / pazpar2_conf.xml
index 6dca610..2c99a0c 100644 (file)
  
  <refsect1><title>FORMAT</title>
   <para>
-   The configuration file is XML-structured. It must be valid XML. All
+   The configuration file is XML-structured. It must be well-formed XML. All
    elements specific to Pazpar2 should belong to the namespace
    <literal>http://www.indexdata.com/pazpar2/1.0</literal> 
    (this is assumed in the
-   following examples). The root element is named <literal>pazpar2</literal>.
+   following examples). The root element is named "<literal>pazpar2</literal>".
    Under the  root element are a number of elements which group categories of
    information. The categories are described below.
   </para>
   
+  <refsect2 id="config-threads"><title>threads</title>
+    <para>
+      This section is optional and is supported for Pazpar2 version 1.3.1 and
+      later . It is identified by element "<literal>threads</literal>" which
+      may include one attribute "<literal>number</literal>" which specifies
+      the number of worker-threads that the Pazpar2 instance is to use.
+      A value of 0 (zero) disables worker-threads (all work is carried out
+      in main thread).
+    </para>
+  </refsect2>
   <refsect2 id="config-server"><title>server</title>
    <para>
-    This section governs overall behavior of the server. The data
+    This section governs overall behavior of a server endpoint. It is identified
+    by the element "server" which takes an optional attribute, "id", which
+    identifies this particular Pazpar2 server. Any string value for "id"
+    may be given.
+   </para>
+   <para>The data
     elements are described below. From Pazpar2 version 1.2 this is
     a repeatable element.
    </para>
          One of these elements is required for every data element in
          the internal representation of the record (see
          <xref linkend="data_model"/>. It governs
-         subsequent processing as pertains to sorting, relevance
-         ranking, merging, and display of data elements. It supports
-         the following attributes:
+          subsequent processing as pertains to sorting, relevance
+          ranking, merging, and display of data elements. It supports
+          the following attributes:
         </para>
         
         <variablelist> <!-- level 3 -->
             longest element (strlen), 'range' (calculate a range
             of values across all matching records), 'all' (include
             all elements), or 'no' (don't merge; this is the
-                         default);
+            default);
            </para>
           </listitem>
          </varlistentry>
          <varlistentry><term>setting</term>
           <listitem>
            <para>
-             This attribute allows you to make use of static database
-             settings in the processing of records. Three possible values
-             are allowed. 'no' is the default and doesn't do anything.
-             'postproc' copies the value of a setting with the same name
-             into the output of the normalization stylesheet(s). 'parameter'
-             makes the value of a setting with the same name available 
-             as a parameter to the normalization stylesheet, so you
-             can further process the value inside of the stylesheet, or use
-             the value to decide how to deal with other data values.
+            This attribute allows you to make use of static database
+            settings in the processing of records. Three possible values
+            are allowed. 'no' is the default and doesn't do anything.
+            'postproc' copies the value of a setting with the same name
+            into the output of the normalization stylesheet(s). 'parameter'
+            makes the value of a setting with the same name available 
+            as a parameter to the normalization stylesheet, so you
+            can further process the value inside of the stylesheet, or use
+            the value to decide how to deal with other data values.
            </para>
            <para>
-             The purpose of using settings in this way can either be to
-             control the behavior of normalization stylesheet in a database-
-             dependent way, or to easily make database-dependent values
-             available to display-logic in your user interface, without having
-             to implement complicated interactions between the user interface
-             and your configuration system.
+            The purpose of using settings in this way can either be to
+            control the behavior of normalization stylesheet in a database-
+            dependent way, or to easily make database-dependent values
+            available to display-logic in your user interface, without having
+            to implement complicated interactions between the user interface
+            and your configuration system.
            </para>
           </listitem>
          </varlistentry>
     <?xml version="1.0" encoding="UTF-8"?>
     <pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
     
+      <threads number="10"/>
       <server>
         <listen port="9004"/>
         <service>
       </para>
      </listitem>
     </varlistentry>
-    <varlistentry>
+    <varlistentry id="requestsyntax">
      <term>pz:requestsyntax</term>
      <listitem>
       <para>
      <term>pz:nativesyntax</term>
      <listitem>
       <para>
-       The representation (syntax) of the retrieval records. Currently
-       recognized values are iso2709 and xml.
+       Specifies how Pazpar2 shoule map retrieved records to XML. Currently
+       supported values are <literal>xml</literal>,
+       <literal>iso2709</literal> and <literal>txml</literal>.
       </para>
       <para>
-       For iso2709, can also specify a native character set, e.g. "iso2709;latin-1".
-       If no character set is provided, MARC-8 is assumed.
+       The value <literal>iso2709</literal> makes Pazpar2 convert retrieved
+       MARC records to MARCXML. In order to convert to XML, the exact
+       chacater set of the MARC must be known (if not, the resulting
+       XML is probably not well-formed). The character set may be 
+       specified by adding:
+       <literal>;charset=</literal><replaceable>charset</replaceable> to
+       <literal>iso2709</literal>. If omitted, a charset of
+       MARC-8 is assumed. This is correct for most MARC21/USMARC records.
       </para>
       <para>
-        If pz:nativesyntax is not specified, pazpar2 will attempt to determine
-       the value based on the response from the server.
+       The value <literal>txml</literal> is like <literal>iso2709</literal>
+       except that records are converted to TurboMARC instead of MARCXML.
+      </para>
+      <para>
+       The value <literal>xml</literal> is used if Pazpar2 retrieves
+       records that are already XML (no conversion takes place).
       </para>
      </listitem>
     </varlistentry>
     </varlistentry>
 
     <varlistentry>
+     <term>pz:negotiation_charset</term>
+     <listitem>
+      <para>
+       Sets character set for Z39.50 negotiation. Most targets do not support
+       this, and some will even close connection if set (crash on server
+       side or similar). If set, you probably want to set it to
+       <literal>UTF-8</literal>.
+      </para>
+     </listitem>
+    </varlistentry>
+
+    <varlistentry>
      <term>pz:xslt</term>
      <listitem>
       <para>
-       Provides the path of an XSLT stylesheet which will be used to
-       map incoming records to the internal representation.
+       Is a comma separated list of of files that specifies
+       how to convert incoming records to the internal representation.
+      </para>
+      <para>
+       The suffix of each file specifies the kind of tranformation.
+       Suffix "<literal>.xsl</literal>" makes an XSL transform. Suffix
+       "<literal>.mmap</literal>" will use the MMAP transform (described below).
       </para>
       <para>
-       When mapping MARC XML records, XSLT can be bypassed for increased 
+       The special value "<literal>auto</literal>" will use a file
+       which is the <link linkend="requestsyntax">pz:requestsyntax's</link>
+       value followed by
+       <literal>'.xsl'</literal>.
+      </para>
+      <para>
+       When mapping MARC records, XSLT can be bypassed for increased 
        performance with the alternate "MARC map" format.  Provide the
        path of a file with extension ".mmap" containing on each line:
        <programlisting>
       </para>
      </listitem>
     </varlistentry>
-
+    
     <varlistentry>
      <term>pz:apdulog</term>
      <listitem>
       </para>
      </listitem>
     </varlistentry>
-
+    
     <varlistentry>
-      <term>pz:sru</term>
-      <listitem>
-        <para>
-         This setting enables SRU/SRW support. It has three possible settings.
-         'get', enables SRU access through GET requests. 'post' enables SRU/POST
-         support, less commonly supported, but useful if very large requests are
-         to be submitted. 'srw' enables the SRW variation of the protocol.
-       </para>
-      </listitem>
+     <term>pz:sru</term>
+     <listitem>
+      <para>
+       This setting enables SRU/SRW support. It has three possible settings.
+       'get', enables SRU access through GET requests. 'post' enables SRU/POST
+       support, less commonly supported, but useful if very large requests are
+       to be submitted. 'srw' enables the SRW variation of the protocol.
+      </para>
+     </listitem>
     </varlistentry>
-
+    
+    <varlistentry>
+     <term>pz:sru_version</term>
+     <listitem>
+      <para>
+       This allows SRU version to be specified. If unset Pazpar2
+       will the default of YAZ (currently 1.2). Should be set
+       to 1.1 or 1.2.
+      </para>
+     </listitem>
+    </varlistentry>
+    
     <varlistentry>
-      <term>pz:sru_version</term>
-      <listitem>
-        <para>
-         This allows SRU version to be specified. If unset Pazpar2
-         will the default of YAZ (currently 1.2). Should be set
-         to 1.1 or 1.2.
-       </para>
-      </listitem>
+     <term>pz:pqf_prefix</term>
+     <listitem>
+      <para>
+       Allows you to specify an arbitrary PQF query language substring.
+       The provided string is prefixed the user's query after it has been
+       normalized to PQF internally in pazpar2.
+       This allows you to attach complex 'filters' to queries for a given
+       target, sometimes necessary to select sub-catalogs
+       in union catalog systems, etc.
+      </para>
+     </listitem>
     </varlistentry>
-
+    
     <varlistentry>
-      <term>pz:pqf_prefix</term>
-      <listitem>
-        <para>
-         Allows you to specify an arbitrary PQF query language substring. The provided
-         string is prefixed the user's query after it has been normalized to PQF
-         internally in pazpar2. This allows you to attach complex 'filters' to
-         queries for a gien target, sometimes necessary to select sub-catalogs
-         in union catalog systems, etc.
-       </para>
-      </listitem>
+     <term>pz:pqf_strftime</term>
+     <listitem>
+      <para>
+       Allows you to extend a query with dates and operators.
+       The provided string allows certain substitutions and serves as a
+       format string.
+       The special two character sequence '%%' gets converted to the
+       original query. Other characters leading with the percent sign are
+       conversions supported by strftime.
+       All other characters are copied verbatim. For example, the string
+       <literal>@and @attr 1=30 @attr 2=3 %Y %%</literal>
+       would search for current year combined with the original PQF (%%).
+      </para>
+     </listitem>
+    </varlistentry>
+    
+    <varlistentry>
+     <term>pz:sort</term>
+     <listitem>
+      <para>
+       Specifies sort criteria to be applied to the result set.
+       Only works for targets which support the sort service.
+      </para>
+     </listitem>
     </varlistentry>
 
     <varlistentry>
-      <term>pz:sort</term>
-      <listitem>
-        <para>
-         Specifies sort criteria to be applied to the result set. Only works for targets
-         which support the sort service.
-       </para>
-      </listitem>
+     <term>pz:recordfilter</term>
+     <listitem>
+      <para>
+       Specifies a filter which allows Pazpar2 to only include
+       records that meet a certain criteria in a result. Unmatched records
+       will be ignored. The filter takes the form name[~value] , which
+       will include only records with metadata element (name) that has the
+       substring (value) given. If value is omitted all records with the
+       metadata present will be included.
+      </para>
+     </listitem>
     </varlistentry>
    </variablelist>
-  </refsect2>
 
+  </refsect2>
+  
  </refsect1>
  <refsect1><title>SEE ALSO</title>
   <para>