Extend documentation of extended package type
[yaz-moved-to-github.git] / doc / book.xml
index 403bc9c..fe638f3 100644 (file)
    </sect2>
   </sect1>
   <sect1 id="installation.win32">
-   <title>WIN32</title>
+   <title>Windows</title>
    <para>The easiest way to install YAZ on Windows is by downloading
    an installer from
    <ulink url="&url.yaz.download.win32;">here</ulink>.
    </para>
 
    <sect2 id="installation.win32.source">
-    <title>Compiling from Source on WIN32</title>
+    <title>Compiling from Source on Windows</title>
     <para>
      &yaz; is shipped with "makefiles" for the NMAKE tool that comes
      with <ulink url="&url.vstudio;">
      Microsoft Visual Studio</ulink>. It has been tested with
-     Microsoft Visual Studio 2003/2005/2008.
+     Microsoft Visual Studio 2013.
     </para>
     <para>
      Start a command prompt and switch the sub directory
          If <literal>HAVE_LIBXML2</literal> is set to 1, YAZ is compiled
          with SRU support. In this configuration, set
          <literal>LIBXML2_DIR</literal> to the
-         <ulink url="&url.libxml2;">libxml2</ulink> source directory
-        and
-        <literal>ZLIB_DIR</literal> to the zlib directory.
-        </para>
-        <para>
-         Windows versions of libxslt, libxml2, zlib and iconv can be found
-        <ulink url="&url.libxml2.download.win32;">
-         Igor Zlatkovi&#x0107;' site</ulink>.
-        </para>
-       <note>
-        <para>
-         YAZ is not using zlib but libxml2 is depending on it.
-        </para>
-       </note>
+         <ulink url="&url.libxml2;">libxml2</ulink> source directory.
+       </para>
+       <para>
+        You can get pre-compiled Libxml2+Libxslt DLLs and headers from
+        <ulink url="&url.libxml2.download.windows;">here</ulink>.
+        Should you with to compile those libraries yourself, refer to
+        to <xref linkend="installation.windows.libxml2"/>
+       </para>
        </listitem>
       </varlistentry>
       <varlistentry>
    </sect2>
 
    <sect2 id="installation-linking-yaz-win32">
-    <title>How to make apps using YAZ on WIN32</title>
+    <title>How to make apps using YAZ on Windows</title>
     <para>
-     This section will go though the process of linking your WIN32
+     This section will go though the process of linking your Windows
      applications with &yaz;.
     </para>
     <para>
      Some people are confused by the fact that we use the nmake
      tool to build &yaz;. They think they have to do that too - in order
-     to make their WIN32 applications work with &yaz;. The good news is that
+     to make their Windows applications work with &yaz;. The good news is that
      you don't have to. You can use the integrated environment of
      Visual Studio if desired for your own application.
     </para>
      </variablelist>
     </para>
    </sect2>
+
+   <sect2 id="installation.windows.libxml2">
+    <title>Compiling Libxml2 and Libxslt on windows</title>
+    <para>
+     Download libxml2 and Libxslt source and unpack it.
+     In the example below we install  Libxml2 2.9.2 and Libxslt 1.1.28
+     for 32-bit, so we  use the destination directories
+     libxml2.2.9.2.win32 and libxslt-1.1.28.win32 to reflect both
+     version and architecture.
+     <screen>
+      cd win32
+      cscript configure.js prefix=c:\libxml2-2.9.2.win32 iconv=no
+      nmake
+      nmake install
+     </screen>
+    </para>
+    <note>
+     <para>
+      There's an error in <filename>configure.js</filename> for Libxml2 2.9.2.
+      Line 17 should be assigned to <filename>configure.ac</filename>
+      rather than <filename>configure.in</filename>.
+     </para>
+    </note>
+    <para>
+     For Libxslt it is similar. We must ensure that compilation of
+     Libxslt links against the already installed libxml2.
+     <screen>
+      cd win32
+      cscript configure.js prefix=c:\libxslt-1.1.28.win32 iconv=no \
+          lib=c:\libxml2-2.9.2.win32\lib \
+         include=c:\libxml2-2.9.2.win32\include\libxml2
+      nmake
+      nmake install
+     </screen>
+    </para>
+   </sect2>
+
   </sect1>
  </chapter>
  <!--
        first operation), holds the negotiated version with the server
        (same or lower version).
       </entry><entry>1.2</entry></row>
+      <row id="zoom.extraArgs.option"><entry>
+       extraArgs</entry><entry>
+       Extra arguments for SRU/Solr URLs. The value must be
+       URL encoded already.
+      </entry><entry></entry></row>
       <row id="zoom.facets.option"><entry>
        facets</entry><entry>
        Requested or recommend facets may be given before a search is sent.
        If given and non-empty,
        <ulink url="&url.libmemcached;">libMemcached</ulink>
        will be configured for the connection.
-       This option is inspected by ZOOM when a connection is  established.
+       This option is inspected by ZOOM when a connection is established.
        If the <literal>memcached</literal> option is given
        and YAZ is compiled without libMemcached support, an internal
        diagnostic (10018) will be thrown.
        libMemcached support is available for YAZ 5.0.13 or later. If this
        option is supplied for an earlier version of YAZ, it is
        <emphasis>ignored</emphasis>.
-       The value of this option is a string passed verbatim to
-       the <function>memcached</function> function part of libMemcached.
-       Refer to man page
-       <ulink url="http://manned.org/memcached.3">memcached(3)</ulink>.
-       Earlier versions of libMemcached
-       do not offer this function. In this case only the option
-       <literal>--server=</literal><replaceable>host</replaceable> may
-       be given (YAZ emulates that part of libMemcached).
+       The value of this option is a list options - each is of the
+       form <literal>--name=value</literal>.
+       Option <literal>--server=</literal>host[:port] specifies a memcached
+       server. It may be repeated for multiple memcached servers.
+       Option <literal>--expire=</literal>seconds sets expiry time in seconds
+       for how long result sets are to be cached.
       </entry><entry>none</entry></row>
       <row><entry>
        redis</entry><entry>
        option is supplied for an earlier version of YAZ, it is
        <emphasis>ignored</emphasis>.
        The value of this option is a set options, similar to that
-       of the memcached function. At this stage only --server=host[:port]
-       is supported. Later versions of YAZ might honor expiry for various
-       items and other things that tune the redis usage.
+       of the memcached setting. At this stage only --server=host[:port]
+       and --expire=seconds is supported.
       </entry><entry>none</entry></row>
      </tbody>
     </tgroup>
     The <parameter>type</parameter> is a string of the format:
    </para>
    <para>
-    <replaceable>format</replaceable>[;charset=<replaceable>from</replaceable>[/<replaceable>opacfrom</replaceable>][,<replaceable>to</replaceable>]][;format=<replaceable>v</replaceable>]
+    <replaceable>format</replaceable>[;charset=<replaceable>from</replaceable>[/<replaceable>opacfrom</replaceable>][,<replaceable>to</replaceable>]][;format=<replaceable>v</replaceable>][;base64=<replaceable>xpath</replaceable>]
    </para>
    <para>
-    where <replaceable>format</replaceable> specifies the format of the
-    returned record, <replaceable>from</replaceable>
+    If <literal>charset</literal> is given, then <replaceable>from</replaceable>
     specifies the character set of the record in its original form
     (as returned by the server), <replaceable>to</replaceable> specifies
-    the output (returned)
-    character set encoding.
-    If <replaceable>to</replaceable> is omitted UTF-8 is assumed.
+    the output (returned) character set encoding.
+    If <replaceable>to</replaceable> is omitted, then UTF-8 is assumed.
     If charset is not given, then no character set conversion takes place.
-   </para>
-
-   <para>OPAC records may be returned in a different
-     set from the bibliographic MARC record. If this is this the case,
+    OPAC records may be returned in a different
+    set from the bibliographic MARC record. If this is this the case,
     <replaceable>opacfrom</replaceable> should be set to the character set
     of the OPAC record part.
    </para>
+
+   <para>
+    The <literal>format</literal> is generic but can only be used to
+    specify XML indentation when the value <replaceable>v</replaceable>
+    is 1 (<literal>format=1</literal>).
+   </para>
+   <para>
+    The <literal>base64</literal> allows a full record to be extracted
+    from base64-encoded string in an XML document.
+   </para>
    <note>
      <para>
        Specifying the OPAC record character set requires YAZ 4.1.5 or later.
      </para>
+     <para>
+       Specifying the base64 parameter requires YAZ 4.2.35 or later.
+     </para>
    </note>
    <para>
     The format argument controls whether record data should be XML
     The <parameter>type</parameter> specifies the actual extended service
     package type to be sent.
    </para>
+   <table frame="top" id="zoom.extendedservices.type">
+    <title>Extended Service Type</title>
+    <tgroup cols="2">
+     <colspec colwidth="3*" colname="value"></colspec>
+     <colspec colwidth="7*" colname="description"></colspec>
+     <thead>
+      <row>
+       <entry>Type</entry>
+       <entry>Description</entry>
+      </row>
+     </thead>
+     <tbody>
+      <row>
+       <entry>itemorder</entry><entry>Item Order</entry>
+      </row>
+      <row>
+       <entry>update</entry><entry>Record Update</entry>
+      </row>
+      <row>
+       <entry>create</entry><entry>Database Create</entry>
+      </row>
+      <row>
+       <entry>drop</entry><entry>Database Drop</entry>
+      </row>
+      <row>
+       <entry>commit</entry><entry>Commit Operation</entry>
+      </row>
+     </tbody>
+    </tgroup>
+   </table>
+
    <table frame="top" id="zoom.extendedservices.options">
     <title>Extended Service Common Options</title>
     <tgroup cols="3">
    <sect2 id="zoom.item.order">
     <title>Item Order</title>
     <para>
-     For Item Order, type must be set to <literal>itemorder</literal> in
+     For Item Order, <literal>type</literal> must be set to
+     <literal>itemorder</literal> in
      <function>ZOOM_package_send</function>.
     </para>
 
        <entry>none</entry>
        </row>
        <row>
+       <entry>itemorder-setname</entry>
+       <entry>Name of result set for record</entry>
+       <entry>default</entry>
+       </row>
+       <row>
        <entry>itemorder-item</entry>
        <entry>Position for item (record) requested. An integer</entry>
        <entry>1</entry>
       </tbody>
      </tgroup>
     </table>
+    <para>
+     There are two variants of item order: ILL-variant and
+     XML document variant. In order to use the XML variant the setting
+     <literal>doc</literal> must hold the XML item order document. If that
+     setting is unset, the ILL-variant is used.
+    </para>
+
+    <table frame="top" id="zoom.illrequest.options">
+     <title>ILL Request Options</title>
+     <tgroup cols="1">
+      <colspec colwidth="4*" colname="name"></colspec>
+      <thead>
+       <row>
+       <entry>Option</entry>
+       </row>
+      </thead>
+      <tbody>
+       <row><entry>protocol-version-num</entry></row>
+       <row><entry>transaction-id,initial-requester-id,person-or-institution-symbol,person</entry></row>
+       <row><entry>transaction-id,initial-requester-id,person-or-institution-symbol,institution</entry></row>
+       <row><entry>transaction-id,initial-requester-id,name-of-person-or-institution,name-of-person</entry></row>
+       <row><entry>transaction-id,initial-requester-id,name-of-person-or-institution,name-of-institution</entry></row>
+       <row><entry>transaction-id,transaction-group-qualifier</entry></row>
+       <row><entry>transaction-id,transaction-qualifier</entry></row>
+       <row><entry>transaction-id,sub-transaction-qualifier</entry></row>
+       <row><entry>service-date-time,this,date</entry></row>
+       <row><entry>service-date-time,this,time</entry></row>
+       <row><entry>service-date-time,original,date</entry></row>
+       <row><entry>service-date-time,original,time</entry></row>
+       <row><entry>requester-id,person-or-institution-symbol,person</entry></row>
+       <row><entry>requester-id,person-or-institution-symbol,institution</entry></row>
+       <row><entry>requester-id,name-of-person-or-institution,name-of-person</entry></row>
+       <row><entry>requester-id,name-of-person-or-institution,name-of-institution</entry></row>
+       <row><entry>responder-id,person-or-institution-symbol,person</entry></row>
+       <row><entry>responder-id,person-or-institution-symbol,institution</entry></row>
+       <row><entry>responder-id,name-of-person-or-institution,name-of-person</entry></row>
+       <row><entry>responder-id,name-of-person-or-institution,name-of-institution</entry></row>
+       <row><entry>transaction-type</entry></row>
+       <row><entry>delivery-address,postal-address,name-of-person-or-institution,name-of-person</entry></row>
+       <row><entry>delivery-address,postal-address,name-of-person-or-institution,name-of-institution</entry></row>
+       <row><entry>delivery-address,postal-address,extended-postal-delivery-address</entry></row>
+       <row><entry>delivery-address,postal-address,street-and-number</entry></row>
+       <row><entry>delivery-address,postal-address,post-office-box</entry></row>
+       <row><entry>delivery-address,postal-address,city</entry></row>
+       <row><entry>delivery-address,postal-address,region</entry></row>
+       <row><entry>delivery-address,postal-address,country</entry></row>
+       <row><entry>delivery-address,postal-address,postal-code</entry></row>
+       <row><entry>delivery-address,electronic-address,telecom-service-identifier</entry></row>
+       <row><entry>delivery-address,electronic-address,telecom-service-addreess</entry></row>
+       <row><entry>billing-address,postal-address,name-of-person-or-institution,name-of-person</entry></row>
+       <row><entry>billing-address,postal-address,name-of-person-or-institution,name-of-institution</entry></row>
+       <row><entry>billing-address,postal-address,extended-postal-delivery-address</entry></row>
+       <row><entry>billing-address,postal-address,street-and-number</entry></row>
+       <row><entry>billing-address,postal-address,post-office-box</entry></row>
+       <row><entry>billing-address,postal-address,city</entry></row>
+       <row><entry>billing-address,postal-address,region</entry></row>
+       <row><entry>billing-address,postal-address,country</entry></row>
+       <row><entry>billing-address,postal-address,postal-code</entry></row>
+       <row><entry>billing-address,electronic-address,telecom-service-identifier</entry></row>
+       <row><entry>billing-address,electronic-address,telecom-service-addreess</entry></row>
+       <row><entry>ill-service-type</entry></row>
+       <row><entry>requester-optional-messages,can-send-RECEIVED</entry></row>
+       <row><entry>requester-optional-messages,can-send-RETURNED</entry></row>
+       <row><entry>requester-optional-messages,requester-SHIPPED</entry></row>
+       <row><entry>requester-optional-messages,requester-CHECKED-IN</entry></row>
+       <row><entry>search-type,level-of-service</entry></row>
+       <row><entry>search-type,need-before-date</entry></row>
+       <row><entry>search-type,expiry-date</entry></row>
+       <row><entry>search-type,expiry-flag</entry></row>
+       <row><entry>place-on-hold</entry></row>
+       <row><entry>client-id,client-name</entry></row>
+       <row><entry>client-id,client-status</entry></row>
+       <row><entry>client-id,client-identifier</entry></row>
+       <row><entry>item-id,item-type</entry></row>
+       <row><entry>item-id,call-number</entry></row>
+       <row><entry>item-id,author</entry></row>
+       <row><entry>item-id,title</entry></row>
+       <row><entry>item-id,sub-title</entry></row>
+       <row><entry>item-id,sponsoring-body</entry></row>
+       <row><entry>item-id,place-of-publication</entry></row>
+       <row><entry>item-id,publisher</entry></row>
+       <row><entry>item-id,series-title-number</entry></row>
+       <row><entry>item-id,volume-issue</entry></row>
+       <row><entry>item-id,edition</entry></row>
+       <row><entry>item-id,publication-date</entry></row>
+       <row><entry>item-id,publication-date-of-component</entry></row>
+       <row><entry>item-id,author-of-article</entry></row>
+       <row><entry>item-id,title-of-article</entry></row>
+       <row><entry>item-id,pagination</entry></row>
+       <row><entry>item-id,ISBN</entry></row>
+       <row><entry>item-id,ISSN</entry></row>
+       <row><entry>item-id,additional-no-letters</entry></row>
+       <row><entry>item-id,verification-reference-source</entry></row>
+       <row><entry>copyright-complicance</entry></row>
+       <row><entry>retry-flag</entry></row>
+       <row><entry>forward-flag</entry></row>
+       <row><entry>requester-note</entry></row>
+       <row><entry>forward-note</entry></row>
+      </tbody>
+     </tgroup>
+    </table>
    </sect2>
    <sect2 id="zoom.record.update">
     <title>Record Update</title>
     <para>
-     For Record Update, type must be set to <literal>update</literal> in
+     For Record Update, <literal>type</literal> must be set to
+     <literal>update</literal> in
      <function>ZOOM_package_send</function>.
     </para>
     <table frame="top" id="zoom.record.update.options">
 
    <sect2 id="zoom.database.create"><title>Database Create</title>
     <para>
-     For Database Create, type must be set to <literal>create</literal> in
+     For Database Create, <literal>type</literal> must be set to
+     <literal>create</literal> in
      <function>ZOOM_package_send</function>.
     </para>
 
    <sect2 id="zoom.database.drop">
     <title>Database Drop</title>
     <para>
-     For Database Drop, type must be set to <literal>drop</literal> in
+     For Database Drop, <literal>type</literal> must be set to
+     <literal>drop</literal> in
      <function>ZOOM_package_send</function>.
     </para>
     <table frame="top" id="zoom.database.drop.options">
    <sect2 id="zoom.commit">
     <title>Commit Operation</title>
     <para>
-     For Commit, type must be set to <literal>commit</literal> in
+     For Commit, <literal>type</literal> must be set to
+     <literal>commit</literal> in
      <function>ZOOM_package_send</function>.
     </para>
    </sect2>
@@ -5700,6 +5884,12 @@ typedef struct {
           in YAZ 4.2.38.
          </entry>
          </row>
+         <row><entry><literal>s=sl</literal></entry>
+         <entry>
+           Tokens are split into sub-phrases of all combinations - in order.
+          This facility appeared in YAZ 5.14.0.
+         </entry>
+         </row>
          <row><entry><literal>r=o</literal></entry>
          <entry>
           Allows ranges and the operators greather-than, less-than, ...
@@ -7363,21 +7553,25 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
        </listitem>
       </varlistentry>
       <varlistentry>
-       <term><literal>xslt</literal></term>
+       <term><literal>select</literal></term>
        <listitem>
         <para>
-         The <literal>xslt</literal> element specifies a conversion
-         via &acro.xslt;. The following attributes may be specified:
+         The <literal>select</literal> selects one or more text nodes
+        and decodes them as XML.
+        The following attributes may be specified:
          <variablelist>
-          <varlistentry><term><literal>stylesheet</literal> (REQUIRED)</term>
+          <varlistentry><term><literal>path</literal> (REQUIRED)</term>
            <listitem>
             <para>
-             Stylesheet file.
+             X-Path expression for selecting text nodes.
             </para>
            </listitem>
           </varlistentry>
          </variablelist>
         </para>
+        <para>
+         This conversion is available in YAZ 5.8.0 and later.
+        </para>
        </listitem>
       </varlistentry>
       <varlistentry>
@@ -7395,6 +7589,24 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
         </para>
        </listitem>
       </varlistentry>
+      <varlistentry>
+       <term><literal>xslt</literal></term>
+       <listitem>
+        <para>
+         The <literal>xslt</literal> element specifies a conversion
+         via &acro.xslt;. The following attributes may be specified:
+         <variablelist>
+          <varlistentry><term><literal>stylesheet</literal> (REQUIRED)</term>
+           <listitem>
+            <para>
+             Stylesheet file.
+            </para>
+           </listitem>
+          </varlistentry>
+         </variablelist>
+        </para>
+       </listitem>
+      </varlistentry>
      </variablelist>
     </para>
    </sect2>