-<!-- $Id: asn.xml,v 1.9 2001-10-24 09:27:59 adam Exp $ -->
- <chapter id="asn"><title>The ASN Module</title>
+<!-- $Id: asn.xml,v 1.10 2001-10-24 20:12:36 adam Exp $ -->
+ <chapter id="asn"><title>The ASN.1 Module</title>
<sect1 id="asn.introduction"><title>Introduction</title>
<para>
The &asn; module provides you with a set of C struct definitions for the
- various PDUs of the protocol, as well as for the complex types
+ various PDUs of the Z39.50 protocol, as well as for the complex types
appearing within the PDUs. For the primitive data types, the C
representation often takes the form of an ordinary C language type,
such as <literal>int</literal>. For ASN.1 constructs that have no direct
idAuthentication</entry><entry>Z_IdAuthentication</entry><entry>NULL
</entry></row>
<row><entry>
- implementationId</entry><entry>char*</entry><entry>"YAZ (id=81)"
+ implementationId</entry><entry>char*</entry><entry>"81"
</entry></row>
<row><entry>
- implementationName</entry><entry>char*</entry><entry>"Index Data/YAZ"
+ implementationName</entry><entry>char*</entry><entry>"YAZ"
</entry></row>
<row><entry>
implementationVersion</entry><entry>char*</entry><entry>YAZ_VERSION
result</entry><entry>bool_t</entry><entry>TRUE
</entry></row>
<row><entry>
- implementationId</entry><entry>char*</entry><entry>"YAZ (id=81)"
+ implementationId</entry><entry>char*</entry><entry>"id)"
</entry></row>
<row><entry>
- implementationName</entry><entry>char*</entry><entry>"Index Data/YAZ"
+ implementationName</entry><entry>char*</entry><entry>"YAZ"
</entry></row>
<row><entry>
implementationVersion</entry><entry>char*</entry><entry>YAZ_VERSION
-<!-- $Id: client.xml,v 1.3 2001-10-24 09:27:59 adam Exp $ -->
+<!-- $Id: client.xml,v 1.4 2001-10-24 20:12:36 adam Exp $ -->
<chapter id="client"><title>The YAZ client</title>
<sect1 id="client.introduction"><title>Introduction</title>
<para>
yaz-client -a - localhost
</screen>
</sect1>
- <sect1 id="client.commands"><title>YAZ client commands</title>
+ <sect1 id="client.commands"><title>Commands</title>
<para>
When the YAZ client has read options and connected to a target, if given,
it will display <literal>Z ></literal> and away your command.
-<!-- $Id: frontend.xml,v 1.6 2001-10-24 09:27:59 adam Exp $ -->
- <chapter id="server"><title>Making an IR Server for Your Database</title>
+<!-- $Id: frontend.xml,v 1.7 2001-10-24 20:12:36 adam Exp $ -->
+ <chapter id="server"><title>Generic server</title>
<sect1><title>Introduction</title>
<para>
If you aren't into documentation, a good way to learn how the
back end interface works is to look at the <filename>backend.h</filename>
file. Then, look at the small dummy-server in
- <filename>ztest/ztest.c</filename>. Finally, you can have a look at
- the <filename>seshigh.c</filename> file, which is where most of the
- logic of the frontend server is located. The <filename>backend.h</filename>
+ <filename>ztest/ztest.c</filename>. The <filename>backend.h</filename>
file also makes a good reference, once you've chewed your way through
the prose of this file.
</para>
<sect1 id="server.backend"><title>The Backend API</title>
<para>
- The headers files that you need to use the interface are in the
- <filename>include/yaz</filename> directory. They are called
- <filename>statserv.h</filename> and <filename>backend.h</filename>. They
- will include other files from the <filename>include/yaz</filename>
- directory, so you'll probably want to use the -I option of your
- compiler to tell it where to find the files. When you run
+ The header file that you need to use the interface are in the
+ <filename>include/yaz</filename> directory. It's called
+ <filename>backend.h</filename>. It will include other files from
+ the <filename>include/yaz</filename> directory, so you'll
+ probably want to use the -I option of your compiler to tell it
+ where to find the files. When you run
<literal>make</literal> in the top-level &yaz; directory,
- everything you need to create your server is put the
- <filename>lib/libyaz.a</filename> library.
+ everything you need to create your server is to link with the
+ <filename>lib/libyaz.la</filename> library.
</para>
</sect1>
-<!-- $Id: future.xml,v 1.4 2001-10-24 09:27:59 adam Exp $ -->
+<!-- $Id: future.xml,v 1.5 2001-10-24 20:12:36 adam Exp $ -->
<chapter id="future"><title>Future Directions</title>
<para>
</para>
<para>
- We now support all PDUs of Z39.50-1995. If there is one of the
- supporting structures that you need but can't find in the prt*.h
- files, send us a note; it may be on its way.
- </para>
-
- <para>
The 'retrieval' module needs to be finalized and documented. We think
it can form a useful resource for people dealing with complex record
structures, but for now, you'll mostly have to chew through the code
</para>
<para>
+ &yaz; is a BER toolkit and as such should support all protocols
+ out there based on that. We'd like to see running ILL applications.
+ It shouldn't be that hard. Another thing that would be intersting is
+ LDAP. Maybe a generic framework for doing IR using both LDAP and
+ Z39.50 transparently.
+ </para>
+
+ <para>
Other than that, YAZ generally moves in the directions which appear to
make the most people happy (including ourselves, as prime users of the
software). If there's something you'd like to see in here, then drop
-<!-- $Id: installation.xml,v 1.4 2001-10-24 12:50:44 adam Exp $ -->
+<!-- $Id: installation.xml,v 1.5 2001-10-24 20:12:36 adam Exp $ -->
<chapter id="installation"><title>Compilation and Installation</title>
+ <sect1><title>Introduction</title>
<para>
- The latest version of the software will generally be found at
+ The latest version of the software will generally be found at:
</para>
<para>
<ulink url="http://ftp.indexdata.dk/pub/yaz/">
<listitem><para>HP/UX</para></listitem>
<listitem><para>SunOS/Solaris</para></listitem>
<listitem><para>DEC Unix</para></listitem>
+ <listitem><para>OpenBSD/FreeBSD</para></listitem>
<listitem><para>Linux</para></listitem>
<listitem><para>IBM AIX</para></listitem>
<listitem><para>Data General DG/UX (with some CFLAGS tinkering)
</ulink>, or the address given at the top of this document.
</para>
+ </sect1>
<sect1 id="installation.unix"><title>UNIX</title>
<para>
Note that if your system doesn't have a native ANSI C compiler, you may
- have to acquire one separately. We recommend gcc.
+ have to acquire one separately. We recommend
+ <ulink url="http://gcc.gnu.org">GCC</ulink>.
</para>
<para>
- For UNIX we use GNU configure to create Makefiles for &yaz;.
- Generally it should be sufficient to run configure without options:
+ For UNIX, the GNU tools
+ <ulink url="http://www.gnu.org/software/autoconf/">Autoconf</ulink>,
+ <ulink url="http://www.gnu.org/software/automake/">Automake</ulink> and
+ <ulink url="http://www.gnu.org/software/libtool/">Libtool</ulink>
+ is used to generate Makefiles and configure &yaz; for the system.
+ You do <emphasis>not</emphasis> these tools unless you're using the
+ CVS version of &yaz;.
+ Generally it should be sufficient to run configure without options,
+ like this:
</para>
<screen>
<para>
The following files are generated by the make process:
<variablelist>
- <varlistentry><term><filename>lib/libyaz.a</filename></term>
+ <varlistentry><term><filename>lib/libyaz.la</filename></term>
+ <listitem><para>
+ The main &yaz; library. This is no ordinary library. It's
+ a Libtool archive.
+ By default, &yaz; creates a static library in
+ <filename>lib/.libs/libyaz.a</filename>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>lib/libyazthread.la</filename></term>
<listitem><para>
- The &yaz; programmers' library.
+ When threading is supported/enabled by configure this GNU libtool
+ library is created. It include functions that allows &yaz;
+ to use threads.
</para></listitem></varlistentry>
<varlistentry><term><filename>ztest/yaz-ztest</filename></term>
- <listitem><para>A test Z39.50 server.
+ <listitem><para>A test Z39.50 server.
</para></listitem></varlistentry>
<varlistentry><term><filename>client/yaz-client</filename></term>
- <listitem><para>A command mode Z39.50 client.
+ <listitem><para>A YAZ Z39.50 client. See chapter <link linkend="client">
+ YAZ client</link> for more information.
</para></listitem></varlistentry>
<varlistentry><term><filename>yaz-config</filename></term>
- <listitem><para>A Bourne-shell script that holds build
- settings for &yaz;.
+ <listitem><para>A Bourne-shell script, generate by configure, that
+ specifies how external applications should compile - and link with
+ &yaz;.
</para></listitem></varlistentry>
<varlistentry><term><filename>yaz-comp</filename></term>
<listitem><para>The ASN.1 compiler for &yaz;. Requires the
- Tcl Shell, <application>tclsh</application>, in current path to work.
+ Tcl Shell, <application>tclsh</application>, in
+ <literal>PATH</literal> to operate.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>zoom/zoomsh</filename></term>
+ <listitem><para>
+ A simple shell implemented on top of the
+ <link linkend="zoom">ZOOM</link> functions.
+ The shell is a command line application that allows you to enter
+ simple commands perform to perform ZOOM operations.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>zoom/zoomtst1</filename>,
+ <filename>zoom/zoomtst2</filename>, ..</term>
+ <listitem><para>
+ Several small applications that demonstrates the use of ZOOM.
</para></listitem></varlistentry>
</variablelist>
<para>
&yaz; is shipped with "makefiles" for the NMAKE tool that comes
- with Visual C++.
-
- Start an MS-DOS prompt and switch the sub directory
+ with Microsoft Visual C++. Version 6 has been tested. We expect that
+ &yaz; should compile with version 5 as well.
+ </para>
+ <para>
+ Start a command prompt and switch the sub directory
<filename>WIN</filename> where the file <filename>makefile</filename>
is located. Customize the installation by editing the
<filename>makefile</filename> file (for example by using notepad).
The following summarises the most important settings in that file:
-
- <table frame="top"><title>WIN32 makefile settings</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Setting</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>DEBUG</literal></entry>
- <entry> If set to 1, the software is
- compiled with debugging libraries. If set to 0, the software
- is compiled with release (non-debugging) libraries.
- </entry>
- </row>
-
- <row>
- <entry><literal>TCL</literal></entry>
- <entry> Specifies the name of the Tcl shell (EXE-file).
+
+ <variablelist>
+ <varlistentry><term><literal>DEBUG</literal></term>
+ <listitem><para>
+ If set to 1, the software is
+ compiled with debugging libraries (code generation is
+ multi-threaded debug DLL).
+ If set to 0, the software is compiled with release libraries
+ (code generation is multi-threaded DLL).
+ </para></listitem>
+ </varlistentry>
+ <varlistentry><term><literal>TCL</literal></term>
+ <listitem><para>
+ Specifies the name of the Tcl shell (EXE-file).
You do not need setting this or installing Tcl unless you wish
to change or add ASN.1 for &yaz;.
- </entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
</para>
<para>
When satisfied with the settings in the makefile type
<screen>
nmake
</screen>
+ If command <filename>nmake</filename> is not found on your system
+ you probably haven't defined the environment variables required to
+ use that tool. To fix that, find and run the batch file
+ <filename>vcvars32.bat</filename>. You need to run it from within
+ the command prompt or set the environment variables "globally";
+ otherwise it doesn't work.
+ </para>
+ <para>
+ If you wish to recompile &yaz; - for example if you modify
+ settings in the <filename>makefile</filename> you can delete
+ object files, etc by running.
+ <screen>
+ nmake clean
+ </screen>
</para>
<para>
The following files are generated upon successful compilation:
<variablelist>
<varlistentry><term><filename>bin/yaz.dll</filename></term>
<listitem><para>
- the multi-threaded &yaz; DLL.
+ The multi-threaded &yaz; Dynamic Link Library.
</para></listitem></varlistentry>
- <varlistentry><term><filename>bin/yaz-ztest.exe</filename></term>
+ <varlistentry><term><filename>bin/yaz-client.exe</filename></term>
<listitem><para>
- A console Z39.50 client application.
+ The &yaz; Z39.50 client application. It's a WIN32 console application.
+ See chapter <link linkend="client">YAZ client</link> for more
+ information.
</para></listitem></varlistentry>
<varlistentry><term><filename>bin/yaz-ztest.exe</filename></term>
<listitem><para>
- A console Z39.50 multi threaded server.
+ The example/test Z39.50 multi threaded server. It's a WIN32
+ console application.
</para></listitem></varlistentry>
-
+
+ <varlistentry><term><filename>bin/zoomsh.exe</filename></term>
+ <listitem><para>
+ A simple console application implemented on top of the
+ <link linkend="zoom">ZOOM</link> functions.
+ The application is a command line shell that allows you to enter
+ simple commands perform to perform ZOOM operations.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>bin/zoomtst1.exe</filename>,
+ <filename>bin/zoomtst2.exe</filename>, ..</term>
+ <listitem><para>
+ Several small applications that demonstrates the use of ZOOM.
+ </para></listitem></varlistentry>
+
</variablelist>
</para>
-<!-- $Id: introduction.xml,v 1.4 2001-10-24 09:27:59 adam Exp $ -->
+<!-- $Id: introduction.xml,v 1.5 2001-10-24 20:12:36 adam Exp $ -->
<chapter id="introduction"><title>Introduction</title>
<para>
- The &yaz; toolkit offers several different levels of access to the
- Z39.50 and SR protocols. The level that you need to use depends on
- your requirements, and the role (server or client) that you
- want to implement.
- </para><para>
- The basic level, which is independent of the role, consists of three
- primary interfaces:
+ The <ulink url="http://www.indexdata.dk/yaz/">&yaz;</ulink>
+ toolkit offers several different levels of access to the
+ <ulink url="http://www.loc.gov/z3950/agency/">ISO23950/Z39.50</ulink>
+ and <ulink url="http://www.nlc-bnc.ca/iso/ill/">ILL</ulink> protocols.
+ The level that you need to use depends on your requirements, and
+ the role (server or client) that you want to implement.
+ If you're developing a client application you should consider the
+ <link linkend="zoom">ZOOM</link> API.
+ It is, by far, the easiest way to develop clients in C.
+ Server implementers should consider the
+ <link linkend="server">generic frontend server</link>.
+ None of those high-level API's support the whole protocol, but
+ they support most facilities used in existing Z39.50
+ applications.
+ </para>
+ <para>
+ If you're developing non-standard extensions to Z39.50 or you're
+ going to develop an ILL application you'll have to learn the lower
+ level API's of &yaz;.
+ </para>
+ <para>
+ The basic low level modules, which is independent of the role,
+ consists of three primary interfaces:
<itemizedlist>
- <listitem><para>&asn;, which provides a C representation of the Z39.50/SR
+ <listitem><para>&asn;, which provides a C representation of the Z39.50
protocol packages (PDUs).
</para></listitem>
<listitem><para>&odr;, which encodes and decodes the packages according
</itemizedlist>
The &asn; module represents the ASN.1 definition of
- the SR/Z39.50 protocol. It establishes a set of type and
+ the Z39.50 protocol. It establishes a set of type and
structure definitions, with one structure for each of the top-level
PDUs, and one structure or type for each of the contained ASN.1 types.
For primitive types, or other types that are defined by the ASN.1
provided by the &odr; (Open Data Representation) subsystem.
</para>
<para>
- &odr; is a basic mechanism for representing an
+ &odr; is a basic mechanism for representing an
ASN.1 type in the C programming language, and for implementing BER
encoders and decoders for values of that type. The types defined in
the &asn; module generally have the prefix <literal>Z_</literal>, and
(passively or actively, depending on the role of your application),
and for exchanging BER-encoded PDUs over that connection. When you
create a connection endpoint, you need to specify what transport to
- use (OSI or TCP/IP), and which protocol you want to use (SR or
- Z39.50). For the remainder of the connection's lifetime, you don't have
+ use (TCP/IP or SSL).
+ For the remainder of the connection's lifetime, you don't have
to worry about the underlying transport protocol at all - the &comstack;
will ensure that the correct mechanism is used.
</para>
<para>
We call the combined interfaces to &odr;, &asn;, and &comstack; the service
- level API. It's the API that most closely models the Z39.50/SR
+ level API. It's the API that most closely models the Z39.50
service/protocol definition, and it provides unlimited access to all
fields and facilities of the protocol definitions.
</para>
-<!-- $Id: odr.xml,v 1.5 2001-10-24 09:27:59 adam Exp $ -->
+<!-- $Id: odr.xml,v 1.6 2001-10-24 20:12:36 adam Exp $ -->
<chapter id="odr"><title>The ODR Module</title>
<sect1 id="odr.introduction"><title>Introduction</title>
</para>
<para>
- This is important, so we'll repeat it for emphasis: <emphasis>You do not
- need to read section <link linkend="odr-prog">Programming with ODR</link> to
- implement Z39.50 with &yaz;.</emphasis>
+ This is important, so we'll repeat it for emphasis: <emphasis>You do
+ not need to read section <link linkend="odr-prog">Programming with
+ ODR</link> to implement Z39.50 with &yaz;.</emphasis>
</para>
<para>
</para>
<para>
- The interface is based loosely on that of the Sun Microsystems XDR routines.
+ The interface is based loosely on that of the Sun Microsystems XDR
+ routines.
Specifically, each function which corresponds to an ASN.1 primitive
type has a dual function. Depending on the settings of the ODR
stream which is supplied as a parameter, the function may be used
either to encode or decode data. The functions that can be built
- using these primitive functions, to represent more complex data types, share
- this quality. The result is that you only have to enter the definition
- for a type once - and you have the functionality of encoding, decoding
- (and pretty-printing) all in one unit. The resulting C source code is
- quite compact, and is a pretty straightforward representation of the
- source ASN.1 specification. Although no ASN.1 compiler is supplied
- with &odr; at this time, it shouldn't be too difficult to write one, or
- perhaps even to adapt an existing compiler to output &odr; routines
- (not surprisingly, writing encoders/decoders using &odr; turns out
- to be boring work).
+ using these primitive functions, to represent more complex data types,
+ share this quality. The result is that you only have to enter the
+ definition for a type once - and you have the functionality of encoding,
+ decoding (and pretty-printing) all in one unit.
+ The resulting C source code is quite compact, and is a pretty
+ straightforward representation of the source ASN.1 specification.
</para>
<para>
-<!-- $Id: tools.xml,v 1.7 2001-10-24 12:50:44 adam Exp $ -->
+<!-- $Id: tools.xml,v 1.8 2001-10-24 20:12:36 adam Exp $ -->
<chapter id="tools"><title>Supporting Tools</title>
<para>
AttributeType ::= integer.
- AttributeValue ::= integer.
+ AttributeValue ::= integer || string.
Complex ::= Operator QueryStruct QueryStruct.
</para>
<para>
- The EUROPAGATE research project working under the Libraries programme
+ The <ulink url="http://europagate.dtv.dk/">EUROPAGATE</ulink>
+ research project working under the Libraries programme
of the European Commission's DG XIII has, amongst other useful tools,
implemented a general-purpose CCL parser which produces an output
structure that can be trivially converted to the internal RPN
- representation of YAZ (The <literal>Z_RPNQuery</literal> structure).
+ representation of &yaz; (The <literal>Z_RPNQuery</literal> structure).
Since the CCL utility - along with the rest of the software
- produced by EUROPAGATE - is made freely available on a liberal license, it
- is included as a supplement to YAZ.
+ produced by EUROPAGATE - is made freely available on a liberal
+ license, it is included as a supplement to &yaz;.
</para>
<sect3><title>CCL Syntax</title>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd" [
+ "/usr/share/sgml/docbook/dtd/xml/4.0/docbookx.dtd" [
<!ENTITY oslash "ø"> <!-- CIRCLED DIVISION SLASH -->
<!ENTITY yaz "YAZ">
<!ENTITY comstack "<acronym>COMSTACK</acronym>">
<!ENTITY zoom "<acronym>ZOOM</acronym>">
]>
-<!-- $Id: yaz.xml,v 1.8 2001-10-24 09:27:59 adam Exp $ -->
+<!-- $Id: yaz.xml,v 1.9 2001-10-24 20:12:36 adam Exp $ -->
<book id="yaz">
<bookinfo>
<title>YAZ User's Guide and Reference</title>
package. &yaz; is a compact toolkit that provides access to the
Z39.50 protocol, as well as a set of higher-level tools for
implementing the server and client roles, respectively.
- The documentation can be used on its own, or as a reference when looking
- at the example applications provided with the package.
+ The documentation can be used on its own, or as a reference when
+ looking at the example applications provided with the package.
</simpara></abstract>
</bookinfo>
&chap-introduction;
&chap-installation;
&chap-zoom;
+ &chap-frontend;
&chap-client;
&chap-asn;
&chap-tools;
&chap-odr;
&chap-comstack;
- &chap-frontend;
&chap-future;
&app-license;
&app-indexdata;
</book>
+<!-- usr/share/sgml/docbook/dtd/xml/4.0/docbook.cat" -->
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
-sgml-local-catalogs: "/usr/share/sgml/docbook/dtd/xml/4.1.2/docbook.cat"
+sgml-local-catalogs: "/usr/share/sgml/docbook/dtd/generalized.cat"
sgml-namecase-general:t
End:
-->
-<!-- $Id: zoom.xml,v 1.2 2001-10-24 09:27:59 adam Exp $ -->
- <chapter id="zoom"><title>ZOOM</title>
+<!-- $Id: zoom.xml,v 1.3 2001-10-24 20:12:36 adam Exp $ -->
+ <chapter id="zoom"><title>Building clients with ZOOM</title>
<para>
&zoom; is an acronym for Z39.50 Object Oriented Model and is
programming language or toolkit.
</para>
<para>
- The lack of a simple Z39.50 client API for &yaz; was more apparanet
+ The lack of a simple Z39.50 client API for &yaz; was more apparent
than ever. So, when the first ZOOM specification was available
an implementation for &yaz; was developed. For the first time, it is
now easier to develop clients than servers with &yaz;. This
<function>Z3950_connection_option</function>.
</para>
<para>
- The number of hits also called result-set is returned by
- function <function>3950_resultset_size</function>.
+ The number of hits also called result-count is returned by
+ function <function>Z3950_resultset_size</function>.
</para>
<para>
Function <function>Z3950_resultset_get</function> is similar to
and <literal>F</literal> for brief and full respectively.
</entry><entry>none</entry></row>
<row><entry>
- preferredRecordSyntax</entry><entry>Preferred Syntax, like
+ preferredRecordSyntax</entry><entry>Preferred Syntax, such as
<literal>USMARC</literal>, <literal>SUTRS</literal>, etc.
</entry><entry>none</entry></row>
<row><entry>
Records are created by functions
<function>Z3950_resultset_records</function> or
<function>Z3950_resultset_record</function>
- and destroyed by <function>Z3950_resultset_destroy</function>.
+ and destroyed by <function>Z3950_record_destroy</function>.
</para>
<para>
A single record is created and returned by function
<function>Z3950_resultset_record</function> that takes a
position as argument. First record has position zero.
- If no record could be obtained <literal>NULL</literal>.
+ If no record could be obtained <literal>NULL</literal> is returned.
</para>
<para>
- Function <function>Z39_resultset_records</function>retrieves
+ Function <function>Z39_resultset_records</function> retrieves
a number of records from a result set. Options <literal>start</literal>
and <literal>count</literal> specifies the range of records to
be returned. Upon completion <literal>recs[0], ..recs[*cnt]</literal>
occurred for connection <literal>cs[n-1]</literal>.
When no events are pending for the connections a value of zero is
returned.
- To make sure all outstanding requests are performed call is function
+ To make sure all outstanding requests are performed call this function
repeatedly until zero is returned.
</para>
</sect1>