3bd7080e2b6c87ec5b94e8ae7c8b7488d9f4ff7b
[yaz-moved-to-github.git] / doc / zoom.xml
1 <!--
2 ### Still to document:
3 ZOOM_connection_errcode(c)
4 ZOOM_connection_errmsg(c)
5 ZOOM_connection_addinfo(c)
6 ZOOM_diag_str(error)
7 ZOOM_resultset_record_immediate(s, pos)
8 ZOOM_resultset_cache_reset(r)
9 ZOOM_resultset_sort(r, sort_type, sort_spec)
10 ZOOM_resultset_sort1(r, sort_type, sort_spec)
11 ZOOM_options_set_callback(opt, function, handle)
12 ZOOM_options_create_with_parent2(parent1, parent2)
13 ZOOM_options_getl(opt, name, len)
14 ZOOM_options_setl(opt, name, value, len)
15 ZOOM_options_get_bool(opt, name, defa)
16 ZOOM_options_get_int(opt, name, defa)
17 ZOOM_options_set_int(opt, name, value)
18 -->
19 <!-- $Id: zoom.xml,v 1.43 2005-11-08 21:53:01 adam Exp $ -->
20  <chapter id="zoom"><title>ZOOM</title>
21   <para>
22     &zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is
23    an initiative started by Mike Taylor (Mike is from the UK, which
24    explains the peculiar name of the model). The goal of &zoom; is to
25    provide a common Z39.50 client API not bound to a particular
26    programming language or toolkit.
27   </para>
28
29   <note>
30    <para>
31     A recent addition to &yaz; is SRW support. You can now make
32     SRW ZOOM connections by specifying scheme <literal>http://</literal>
33     for the hostname for a connection.
34    </para>
35   </note>
36
37   <para>
38    The lack of a simple Z39.50 client API for &yaz; has become more
39    and more apparent over time. So when the first &zoom; specification
40    became available,
41    an implementation for &yaz; was quickly developed. For the first time, it is
42    now as easy (or easier!) to develop clients than servers with &yaz;. This
43    chapter describes the &zoom; C binding. Before going further, please
44    reconsider whether C is the right programming language for the job.
45    There are other language bindings available for &yaz;, and still
46    more
47    are in active development. See the
48    <ulink url="http://zoom.z3950.org/">ZOOM web-site</ulink> for
49    more information.
50   </para>
51   
52   <para>
53    In order to fully understand this chapter you should read and
54    try the example programs <literal>zoomtst1.c</literal>,
55    <literal>zoomtst2.c</literal>, .. in the <literal>zoom</literal>
56    directory.
57   </para>
58   
59   <para>
60    The C language misses features found in object oriented languages
61    such as C++, Java, etc. For example, you'll have to manually,
62    destroy all objects you create, even though you may think of them as
63    temporary. Most objects has a <literal>_create</literal> - and a
64    <literal>_destroy</literal> variant.
65    All objects are in fact pointers to internal stuff, but you don't see
66    that because of typedefs. All destroy methods should gracefully ignore a
67    <literal>NULL</literal> pointer.
68   </para>
69   <para>
70    In each of the sections below you'll find a sub section called
71    protocol behavior, that describes how the API maps to the Z39.50
72    protocol.
73   </para>
74   <sect1 id="zoom.connections"><title>Connections</title>
75    
76    <para>The Connection object is a session with a target.
77    </para>
78    <synopsis>
79     #include &lt;yaz/zoom.h>
80     
81     ZOOM_connection ZOOM_connection_new (const char *host, int portnum);
82     
83     ZOOM_connection ZOOM_connection_create (ZOOM_options options);
84     
85     void ZOOM_connection_connect(ZOOM_connection c, const char *host,
86                                  int portnum);
87     void ZOOM_connection_destroy (ZOOM_connection c);
88    </synopsis>
89    <para>
90     Connection objects are created with either function
91     <function>ZOOM_connection_new</function> or 
92     <function>ZOOM_connection_create</function>.
93     The former creates and automatically attempts to establish a network
94     connection with the target. The latter doesn't establish
95     a connection immediately, thus allowing you to specify options
96     before establishing network connection using the function
97     <function>ZOOM_connection_connect</function>. 
98     If the port number, <literal>portnum</literal>, is zero, the
99     <literal>host</literal> is consulted for a port specification.
100     If no port is given, 210 is used. A colon denotes the beginning of
101     a port number in the host string. If the host string includes a
102     slash, the following part specifies a database for the connection.
103    </para>
104    <para>
105     You can prefix the host with a scheme followed by colon. The
106     default scheme is <literal>tcp</literal> (Z39.50 protocol).
107     The scheme <literal>http</literal> selects SRW over HTTP.
108    </para>
109    <para>
110     Connection objects should be destroyed using the function
111     <function>ZOOM_connection_destroy</function>.
112    </para>
113    <synopsis>
114     void ZOOM_connection_option_set(ZOOM_connection c,
115                                     const char *key, const char *val);
116
117     void ZOOM_connection_option_setl(ZOOM_connection c,
118                                      const char *key,
119                                      const char *val, int len);
120
121     const char *ZOOM_connection_option_get(ZOOM_connection c,
122                                            const char *key);
123     const char *ZOOM_connection_option_getl(ZOOM_connection c,
124                                             const char *key,
125                                             int *lenp);
126    </synopsis>
127    <para>
128     The functions <function>ZOOM_connection_option_set</function> and
129     <function>ZOOM_connection_option_setl</function> allows you to
130     set an option given by <parameter>key</parameter> to the value
131     <parameter>value</parameter> for the connection. 
132     For <function>ZOOM_connection_option_set</function>, the
133     value is assumed to be a 0-terminated string. Function
134     <function>ZOOM_connection_option_setl</function> specifies a
135     value of a certain size (len).
136    </para>
137    <para>
138     Functions <function>ZOOM_connection_option_get</function> and
139     <function>ZOOM_connection_option_getl</function> returns
140     the value for an option given by <parameter>key</parameter>.
141    </para>
142    <table frame="top"><title>ZOOM Connection Options</title>
143     <tgroup cols="3">
144      <colspec colwidth="4*" colname="name"></colspec>
145      <colspec colwidth="7*" colname="description"></colspec>
146      <colspec colwidth="3*" colname="default"></colspec>
147      <thead>
148       <row>
149        <entry>Option</entry>
150        <entry>Description</entry>
151        <entry>Default</entry>
152       </row>
153      </thead>
154      <tbody>
155       <row><entry>
156         implementationName</entry><entry>Name of Your client
157        </entry><entry>none</entry></row>
158       <row><entry>
159         user</entry><entry>Authentication user name
160        </entry><entry>none</entry></row>
161       <row><entry>
162         group</entry><entry>Authentication group name
163        </entry><entry>none</entry></row>
164       <row><entry>
165         password</entry><entry>Authentication password.
166        </entry><entry>none</entry></row>
167       <row><entry>
168         host</entry><entry>Target host. This setting is "read-only".
169         It's automatically set internally when connecting to a target.
170        </entry><entry>none</entry></row>
171       <row><entry>
172         proxy</entry><entry>Proxy host
173        </entry><entry>none</entry></row>
174       <row><entry>
175         async</entry><entry>If true (1) the connection operates in 
176         asynchronous operation which means that all calls are non-blocking
177         except
178         <link linkend="zoom.events"><function>ZOOM_event</function></link>.
179        </entry><entry>0</entry></row>
180       <row><entry>
181         maximumRecordSize</entry><entry> Maximum size of single record.
182        </entry><entry>1 MB</entry></row>
183       <row><entry>
184         preferredMessageSize</entry><entry> Maximum size of multiple records.
185        </entry><entry>1 MB</entry></row>
186       <row><entry>
187         lang</entry><entry> Language for negotiation.
188        </entry><entry>none</entry></row>
189       <row><entry>
190         charset</entry><entry> Character set for negotiation.
191        </entry><entry>none</entry></row>
192       <row><entry>
193         serverImplementationId</entry><entry>
194         Implementation ID of server.  (The old targetImplementationId
195         option is also supported for the benefit of old applications.)
196        </entry><entry>none</entry></row>
197       <row><entry>
198         targetImplementationName</entry><entry>
199         Implementation Name of server.  (The old
200         targetImplementationName option is also supported for the
201         benefit of old applications.)
202        </entry><entry>none</entry></row>
203       <row><entry>
204         serverImplementationVersion</entry><entry>
205         Implementation Version of server.  (the old
206         targetImplementationVersion option is also supported for the
207         benefit of old applications.)
208        </entry><entry>none</entry></row>
209       <row><entry>
210         databaseName</entry><entry>One or more database names
211         separated by character plus (<literal>+</literal>), which to
212         be used by subsequent search requests on this Connection.
213        </entry><entry>Default</entry></row>
214       <row><entry>
215         piggyback</entry><entry>True (1) if piggyback should be
216         used in searches; false (0) if not.
217        </entry><entry>1</entry></row>
218       <row><entry>
219         smallSetUpperBound</entry><entry>If hits is less than or equal to this
220         value, then target will return all records using small element set name
221        </entry><entry>0</entry></row>
222       <row><entry>
223         largeSetLowerBound</entry><entry>If hits is greater than this
224         value, the target will return no records.
225        </entry><entry>1</entry></row>
226       <row><entry>
227         mediumSetPresentNumber</entry><entry>This value represents
228         the number of records to be returned as part of a search when when
229         hits is less than or equal to large set lower bound and if hits
230         is greater than small set upper bound.
231        </entry><entry>0</entry></row>
232       <row><entry>
233         smallSetElementSetName</entry><entry>
234         The element set name to be used for small result sets.
235        </entry><entry>none</entry></row>
236       <row><entry>
237         mediumSetElementSetName</entry><entry>
238         The element set name to be for medium-sized result sets.
239        </entry><entry>none</entry></row>
240      </tbody>
241     </tgroup>
242    </table>
243    <para>
244     If either option <literal>lang</literal> or <literal>charset</literal>
245     is set, then 
246     <ulink url="http://lcweb.loc.gov/z3950/agency/defns/charneg-3.html">
247      Character Set and Language Negotiation</ulink> is in effect.
248    </para>
249    <synopsis>
250      int ZOOM_connection_error (ZOOM_connection c, const char **cp,
251                                 const char **addinfo);
252      int ZOOM_connection_error_x (ZOOM_connection c, const char **cp,
253                                   const char **addinfo, const char **dset);
254    </synopsis>
255    <para>
256     Function <function>ZOOM_connection_error</function> checks for
257     errors for the last operation(s) performed. The function returns
258     zero if no errors occurred; non-zero otherwise indicating the error.
259     Pointers <parameter>cp</parameter> and <parameter>addinfo</parameter>
260     holds messages for the error and additional-info if passed as
261     non-<literal>NULL</literal>. Function
262     <function>ZOOM_connection_error_x</function> is an extended version
263     of <function>ZOOM_connection_error</function> that is capable of
264     returning name of diagnostic set in <parameter>dset</parameter>.
265    </para>
266    <sect2><title>Z39.50 Protocol behavior</title>
267     <para>
268      The calls <function>ZOOM_connection_new</function> and
269      <function>ZOOM_connection_connect</function> establishes a TCP/IP
270       connection and sends an Initialize Request to the target if
271       possible. In addition, the calls waits for an Initialize Response
272       from the target and the result is inspected (OK or rejected).
273     </para>
274     <para>
275      If <literal>proxy</literal> is set then the client will establish
276      a TCP/IP connection with the peer as specified by the
277      <literal>proxy</literal> host and the hostname as part of the
278      connect calls will be set as part of the Initialize Request.
279      The proxy server will then "forward" the PDU's transparently
280      to the target behind the proxy.
281     </para>
282     <para>
283      For the authentication parameters, if option <literal>user</literal>
284      is set and both options <literal>group</literal> and
285      <literal>pass</literal> are unset, then Open style
286      authentication is used (Version 2/3) in which case the username
287      is usually followed by a slash, then by a password.
288      If either <literal>group</literal>
289      or <literal>pass</literal> is set then idPass authentication
290      (Version 3 only) is used. If none of the options are set, no
291      authentication parameters are set as part of the Initialize Request
292      (obviously).
293     </para>
294     <para>
295      When option <literal>async</literal> is 1, it really means that
296      all network operations are postponed (and queued) until the
297      function <literal>ZOOM_event</literal> is invoked. When doing so
298      it doesn't make sense to check for errors after
299      <literal>ZOOM_connection_new</literal> is called since that
300      operation "connecting - and init" is still incomplete and the
301      API cannot tell the outcome (yet).
302     </para>
303     </sect2>
304    <sect2><title>SRW Protocol behavior</title>
305     <para>
306      The SRW protocol doesn't feature an Inititialize Request, so
307      the connection phase merely establishes a TCP/IP connection
308      with the SOAP service.
309     </para>
310     <para>Most of the ZOOM connection options do not
311      affect SRW and they are ignored. However, future versions
312      of &yaz; might honor <literal>implementationName</literal> and
313      put that as part of User-Agent header for HTTP requests.
314      </para>
315     <para>
316      The <literal>charset</literal> is used in the Content-Type header
317      of HTTP requests.
318     </para>
319    </sect2>
320   </sect1>
321   <sect1 id="zoom.query"><title>Queries</title>
322    <para>
323     Query objects represents queries.
324    </para>
325    <synopsis>
326      ZOOM_query ZOOM_query_create(void);
327
328      void ZOOM_query_destroy(ZOOM_query q);
329
330      int ZOOM_query_prefix(ZOOM_query q, const char *str);
331
332      int ZOOM_query_cql(ZOOM_query s, const char *str);
333
334      int ZOOM_query_sortby(ZOOM_query q, const char *criteria);
335    </synopsis>
336    <para>
337     Create query objects using <function>ZOOM_query_create</function>
338     and destroy them by calling <function>ZOOM_query_destroy</function>.
339     RPN-queries can be specified in <link linkend="PQF">PQF</link>
340     notation by using the
341     function <function>ZOOM_query_prefix</function>.
342     The <function>ZOOM_query_cql</function> specifies a CQL
343     query to be sent to the server/target.
344     More query types will be added in future versions of &yaz;, such as
345     <link linkend="CCL">CCL</link> to RPN-mapping, native CCL query,
346     etc. In addition to a search, a sort criteria may be set. Function
347     <function>ZOOM_query_sortby</function> specifies a 
348     sort criteria using the same string notation for sort as offered by
349     the <link linkend="sortspec">YAZ client</link>.
350    </para>
351    <sect2><title>Protocol behavior</title>
352     <para>
353      The query object is just an interface for the member Query
354      in the SearchRequest. The sortby-function is an interface to the
355      sortSequence member of the SortRequest.
356     </para>
357    </sect2>
358   </sect1>
359   <sect1 id="zoom.resultsets"><title>Result sets</title>
360    <para>
361     The result set object is a container for records returned from
362     a target.
363    </para>
364    <synopsis>
365      ZOOM_resultset ZOOM_connection_search(ZOOM_connection,
366                                            ZOOM_query q);
367
368      ZOOM_resultset ZOOM_connection_search_pqf(ZOOM_connection c,
369                                                const char *q);
370
371      void ZOOM_resultset_destroy(ZOOM_resultset r);
372    </synopsis>
373    <para>
374     Function <function>ZOOM_connection_search</function> creates
375      a result set given a connection and query.
376     Destroy a result set by calling
377     <function>ZOOM_resultset_destroy</function>.
378     Simple clients may using PQF only may use function
379     <function>ZOOM_connection_search_pqf</function> in which case
380     creating query objects is not necessary.
381    </para>
382    <synopsis>
383      void ZOOM_resultset_option_set (ZOOM_resultset r,
384                                       const char *key,
385                                       const char *val);
386
387      const char *ZOOM_resultset_option_get (ZOOM_resultset r,
388                                              const char *key);
389
390      size_t ZOOM_resultset_size (ZOOM_resultset r);
391    </synopsis>
392    <para>
393     Functions <function>ZOOM_resultset_options_set</function> and
394     <function>ZOOM_resultset_get</function> sets and gets an option
395     for a result set similar to <function>ZOOM_connection_option_get</function>
396     and <function>ZOOM_connection_option_set</function>.
397    </para>
398    <para>
399     The number of hits also called result-count is returned by
400     function <function>ZOOM_resultset_size</function>.
401    </para>
402    <table frame="top"><title>ZOOM Result set Options</title>
403     <tgroup cols="3">
404      <colspec colwidth="4*" colname="name"></colspec>
405      <colspec colwidth="7*" colname="description"></colspec>
406      <colspec colwidth="2*" colname="default"></colspec>
407      <thead>
408       <row>
409        <entry>Option</entry>
410        <entry>Description</entry>
411        <entry>Default</entry>
412       </row>
413      </thead>
414      <tbody>
415       <row><entry>
416         start</entry><entry>Offset of first record to be 
417         retrieved from target. First record has offset 0 unlike the
418         protocol specifications where first record has position 1.
419        </entry><entry>0</entry></row>
420       <row><entry>
421         count</entry><entry>Number of records to be retrieved.
422        </entry><entry>0</entry></row>
423       <row><entry>
424         presentChunk</entry><entry>The number of records to be
425         requested from the server in each chunk (present requst).  The
426         value 0 means to request all the records in a single chunk.
427         (The old <literal>step</literal>
428         option is also supported for the benefit of old applications.)
429        </entry><entry>0</entry></row>
430       <row><entry>
431         elementSetName</entry><entry>Element-Set name of records. 
432         Most targets should honor element set name <literal>B</literal>
433         and <literal>F</literal> for brief and full respectively.
434        </entry><entry>none</entry></row>
435       <row><entry>
436         preferredRecordSyntax</entry><entry>Preferred Syntax, such as
437         <literal>USMARC</literal>, <literal>SUTRS</literal>, etc.
438        </entry><entry>none</entry></row>
439       <row><entry>
440         schema</entry><entry>Schema for retrieval, such as
441         <literal>Gils-schema</literal>, <literal>Geo-schema</literal>, etc.
442        </entry><entry>none</entry></row>
443       <row><entry>
444         setname</entry><entry>Name of Result Set (Result Set ID).
445         If this option isn't set, the ZOOM module will automatically
446         allocate a result set name.
447        </entry><entry>default</entry></row>
448      </tbody>
449     </tgroup>
450    </table>
451    <para>
452     For servers that support Search Info report, the following
453     options may be read using <function>ZOOM_resultset_get</function>.
454     This detailed information is read after a successful search has
455     completed.
456    </para>
457    <para>
458     This information is a list of of items, where each item is
459     information about a term or subquery. All items in the list 
460     are prefixed by 
461     <literal>SearchResult.</literal><replaceable>no</replaceable>
462     where no presents the item number (0=first, 1=second). 
463     Read <literal>searchresult.size</literal> to determine the
464     number of items.
465    </para>
466    <table frame="top"><title>Search Info Report options</title>
467     <tgroup cols="2">
468      <colspec colwidth="4*" colname="name"></colspec>
469      <colspec colwidth="7*" colname="description"></colspec>
470      <thead>
471       <row>
472        <entry>Option</entry>
473        <entry>Description</entry>
474       </row>
475      </thead>
476      <tbody>
477       <row>
478        <entry>searchresult.size</entry>
479        <entry>
480         number of search result entries. This option is-nonexistant
481         if no entries are returned by the server.
482        </entry>
483       </row>
484       <row>
485        <entry>searchresult.<replaceable>no</replaceable>.id</entry>
486        <entry>sub query ID</entry>
487       </row>
488       <row>
489        <entry>searchresult.<replaceable>no</replaceable>.count</entry>
490        <entry>result count for item (number of hits)</entry>
491       </row>
492       <row>
493        <entry>searchresult.<replaceable>no</replaceable>.subquery.term</entry>
494        <entry>subquery term</entry>
495       </row>
496       <row>
497        <entry>
498         searchresult.<replaceable>no</replaceable>.interpretation.term
499        </entry>
500        <entry>interpretation term</entry>
501       </row>
502       <row>
503        <entry>
504         searchresult.<replaceable>no</replaceable>.recommendation.term
505        </entry>
506        <entry>recommendation term</entry>
507       </row>
508      </tbody>
509     </tgroup>
510    </table>
511    <sect2>
512     <title>Z39.50 Protocol behavior</title>
513     <para>
514      The creation of a result set involves at least a SearchRequest
515      - SearchResponse protocol handshake. Following that, if a sort
516      criteria was specified as part of the query, a SortRequest -
517      SortResponse handshake takes place. Note that it is necessary to
518      perform sorting before any retrieval takes place, so no records will
519      be returned from the target as part of the SearchResponse because these
520      would be unsorted. Hence, piggyback is disabled when sort criteria
521      are set. Following Search - and a possible sort - Retrieval takes
522      place - as one or more Present Requests/Response pairs being
523      transferred.
524      </para>
525     <para>
526      The API allows for two different modes for retrieval. A high level
527      mode which is somewhat more powerful and a low level one.
528      The low level is enabled when searching on a Connection object
529      for which the settings
530      <literal>smallSetUpperBound</literal>,
531      <literal>mediumSetPresentNumber</literal> and
532      <literal>largeSetLowerBound</literal> are set. The low level mode
533      thus allows you to precisely set how records are returned as part
534      of a search response as offered by the Z39.50 protocol.
535      Since the client may be retrieving records as part of the
536      search response, this mode doesn't work well if sorting is used.
537      </para>
538     <para>
539      The high-level mode allows you to fetch a range of records from
540      the result set with a given start offset. When you use this mode
541      the client will automatically use piggyback if that is possible
542      with the target and perform one or more present requests as needed.
543      Even if the target returns fewer records as part of a present response
544      because of a record size limit, etc. the client will repeat sending
545      present requests. As an example, if option <literal>start</literal>
546      is 0 (default) and <literal>count</literal> is 4, and
547      <literal>piggyback</literal> is 1 (default) and no sorting criteria
548      is specified, then the client will attempt to retrieve the 4
549      records as part the search response (using piggyback). On the other
550      hand, if either <literal>start</literal> is positive or if
551      a sorting criteria is set, or if <literal>piggyback</literal>
552      is 0, then the client will not perform piggyback but send Present
553      Requests instead.
554     </para>
555     <para>
556      If either of the options <literal>mediumSetElementSetName</literal> and
557      <literal>smallSetElementSetName</literal> are unset, the value
558      of option <literal>elementSetName</literal> is used for piggyback
559      searches. This means that for the high-level mode you only have
560      to specify one elementSetName option rather than three.
561      </para>
562    </sect2>
563    <sect2>
564     <title>SRW Protocol behavior</title>
565     <para>
566      Current version of &yaz; does not take advantage of a result set id
567      returned by the SRW server. Future versions might do, however.
568      Since, the ZOOM driver does not save result set IDs any
569      present (retrieval) is transformed to a SRW SearchRetrieveRequest
570      with same query but, possibly, different offsets.
571     </para>
572     <para>
573      Option <literal>schema</literal> specifies SRW schema
574      for retrieval. However, options <literal>elementSetName</literal> and
575      <literal>preferredRecordSyntax</literal> are ignored.
576     </para>
577     <para>
578      Options <literal>start</literal> and <literal>count</literal> 
579      are supported by SRW.
580      The remaining options
581      <literal>piggyback</literal>, 
582      <literal>smallSetUpperBound</literal>, 
583      <literal>largeSetLowerBound</literal>, 
584      <literal>mediumSetPresentNumber</literal>, 
585      <literal>mediumSetElementSetName</literal>,
586       <literal>smallSetElementSetName</literal> are
587      unsupported.
588     </para>
589     <para>
590      SRW supports CQL queries, <emphasis>not</emphasis> PQF.
591      If PQF is used, however, the PQF query is transferred anyway
592      using non-standard element <literal>pQuery</literal> in
593      SRW SearchRetrieveRequest.
594     </para>
595     <para>
596      Unfortunately, SRW does not define a database setting. Hence,
597      <literal>databaseName</literal> is unsupported and ignored.
598      However, the path part in host parameter for functions 
599      <function>ZOOM_connecton_new</function> and
600      <function>ZOOM_connection_connect</function> acts as a
601      database (at least for the &yaz; SRW server).
602     </para>
603    </sect2>
604   </sect1>
605   <sect1 id="zoom.records"><title>Records</title>
606    <para>
607     A record object is a retrieval record on the client side -
608     created from result sets.
609    </para>
610    <synopsis>
611      void ZOOM_resultset_records (ZOOM_resultset r,
612                                   ZOOM_record *recs,
613                                   size_t start, size_t count);
614      ZOOM_record ZOOM_resultset_record (ZOOM_resultset s, size_t pos);
615
616      const char *ZOOM_record_get (ZOOM_record rec, const char *type,
617                                   size_t *len);
618
619      ZOOM_record ZOOM_record_clone (ZOOM_record rec);
620
621      void ZOOM_record_destroy (ZOOM_record rec);
622    </synopsis>
623    <para>
624     References to temporary records are returned by functions 
625     <function>ZOOM_resultset_records</function> or
626     <function>ZOOM_resultset_record</function>.
627     </para>
628    <para>
629     If a persistent reference to a record is desired
630     <function>ZOOM_record_clone</function> should be used.
631     It returns a record reference that should be destroyed
632     by a call to <function>ZOOM_record_destroy</function>.
633    </para>
634    <para>
635     A single record is returned by function
636     <function>ZOOM_resultset_record</function> that takes a 
637     position as argument. First record has position zero.
638     If no record could be obtained <literal>NULL</literal> is returned.
639    </para>
640    <para>
641     Function <function>ZOOM_resultset_records</function> retrieves
642     a number of records from a result set. Parameter <literal>start</literal>
643     and <literal>count</literal> specifies the range of records to
644     be returned. Upon completion array
645     <literal>recs[0], ..recs[count-1]</literal>
646     holds record objects for the records. The array of records
647      <literal>recs</literal> should be allocated prior the call
648     <function>ZOOM_resultset_records</function>. Note that for those
649     records that couldn't be retrieved from the target
650     <literal>recs[ ..]</literal> is set to <literal>NULL</literal>.
651    </para>
652    <para id="zoom.record.get">
653     In order to extract information about a single record,
654     <function>ZOOM_record_get</function> is provided. The
655     function returns a pointer to certain record information. The
656     nature (type) of the pointer depends on the parameter,
657     <parameter>type</parameter>.
658    </para>
659    <para>
660     The <parameter>type</parameter> is a string of the format:
661    </para>
662    <para>
663     <replaceable>form</replaceable>[; charset=<replaceable>from</replaceable>[,<replaceable>to</replaceable>]]
664    </para>
665    <para>
666     where <replaceable>form</replaceable> specifies the format of the
667     returned record, <replaceable>from</replaceable>
668     specifies the character set of the record in its original form
669     (as returned by the server), <replaceable>to</replaceable> specifies
670     the output (returned)
671     character set encoding.
672     If charset is not given, then no character set conversion takes place.
673     If <replaceable>to</replaceable> is omitted UTF-8 is assumed.
674    </para>
675    <para>
676     In addition, for certain types, the length
677     <literal>len</literal> passed will be set to the size in bytes of
678     the returned information. 
679     </para>
680    <para>
681     The following are the supported values for <replaceable>form</replaceable>.
682     <variablelist>
683      <varlistentry><term><literal>database</literal></term>
684       <listitem><para>Database of record is returned
685         as a C null-terminated string. Return type
686         <literal>const char *</literal>. 
687        </para></listitem>
688      </varlistentry>
689      <varlistentry><term><literal>syntax</literal></term>
690       <listitem><para>The transfer syntax of the record is returned
691         as a C null-terminated string containing the symbolic name of
692         the record syntax, e.g. <literal>Usmarc</literal>. Return type
693         is
694         <literal>const char *</literal>. 
695        </para></listitem>
696      </varlistentry>
697      <varlistentry><term><literal>render</literal></term>
698       <listitem><para>The record is returned in a display friendly
699         format. Upon completion buffer is returned
700         (type <literal>const char *</literal>) and length is stored in
701         <literal>*len</literal>.
702        </para></listitem>
703      </varlistentry>
704      <varlistentry><term><literal>raw</literal></term>
705       <listitem><para>The record is returned in the internal
706         YAZ specific format. For GRS-1, Explain, and others, the
707         raw data is returned as type 
708         <literal>Z_External *</literal> which is just the type for
709         the member <literal>retrievalRecord</literal> in
710         type <literal>NamePlusRecord</literal>.
711         For SUTRS and octet aligned record (including all MARCs) the
712         octet buffer is returned and the length of the buffer.
713        </para></listitem>
714      </varlistentry>
715      <varlistentry><term><literal>xml</literal></term>
716       <listitem><para>The record is returned in XML if possible.
717         SRW/SRU and Z39.50 records with transfer syntax XML are
718         returned verbatim. MARC records are returned in
719         <ulink url="http://www.loc.gov/standards/marcxml/">
720          MARCXML
721          </ulink> 
722         (converted from ISO2709 to MARCXML by YAZ).
723         GRS-1 and OPAC records are not supported for this form.
724         Upon completion, the XML buffer is returned
725         (type <literal>const char *</literal>) and length is stored in
726         <literal>*len</literal>.
727        </para></listitem>
728      </varlistentry>
729      <varlistentry><term><literal>opac</literal></term>
730       <listitem><para>OPAC for record is returned in XML.
731        </para></listitem>
732      </varlistentry>
733     </variablelist>
734    </para>
735    <para>
736     Most
737     <ulink url="http://www.loc.gov/marc/">
738      MARC21
739     </ulink>
740     records uses the 
741     <ulink url="http://www.loc.gov/marc/specifications/speccharmarc8.html">
742      MARC-8
743     </ulink>
744     character set encoding.
745     An application that wishes to display in Latin-1 would use
746     <screen>
747      render; charset=marc8,iso-8859-1
748     </screen>
749    </para>
750    <sect2><title>Z39.50 Protocol behavior</title>
751     <para>
752      The functions <function>ZOOM_resultset_record</function> and
753      <function>ZOOM_resultset_records</function> inspects the client-side
754      record cache. Records not found in cache are fetched using
755      Present.
756      The functions may block (and perform network I/O)  - even though option
757      <literal>async</literal> is 1, because they return records objects.
758      (and there's no way to return records objects without retrieving them!).
759      </para>
760     <para>
761      There is a trick, however, in the usage of function
762      <function>ZOOM_resultset_records</function> that allows for
763      delayed retrieval (and makes it non-blocking). By using
764      a null pointer for <parameter>recs</parameter> you're indicating
765      you're not interested in getting records objects
766      <emphasis>now</emphasis>.
767     </para>
768    </sect2>
769    <sect2><title>SRW Protocol behavior</title>
770     <para>
771      The ZOOM driver for SRW treats records returned by a SRW server
772      as if they where Z39.50 records with transfer syntax XML and
773      no element set name or database name.
774     </para>
775    </sect2>
776   </sect1>
777   <sect1 id="zoom.scan"><title>Scan</title>
778    <para>
779     This section describes an interface for Scan. Scan is not an
780     official part of the ZOOM model yet. The result of a scan operation
781     is the <literal>ZOOM_scanset</literal> which is a set of terms
782     returned by a target.
783    </para>
784
785    <para>
786     The Scan interface is Z39.50 only. SRW version 1.0 does not
787     support this.
788    </para>
789
790    <synopsis>
791     ZOOM_scanset ZOOM_connection_scan(ZOOM_connection c,
792                                       const char *startpqf);
793
794     size_t ZOOM_scanset_size(ZOOM_scanset scan);
795
796     const char * ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
797                                    int *occ, size_t *len);
798
799     const char * ZOOM_scanset_display_term(ZOOM_scanset scan, size_t pos,
800                                            int *occ, size_t *len);
801
802     void ZOOM_scanset_destroy (ZOOM_scanset scan);
803
804     const char *ZOOM_scanset_option_get(ZOOM_scanset scan,
805                                          const char *key);
806
807     void ZOOM_scanset_option_set(ZOOM_scanset scan, const char *key,
808                                  const char *val);
809     </synopsis>
810    <para>
811     The scan set is created by function
812     <function>ZOOM_connection_scan</function> which performs a scan
813     operation on the connection using the specified
814     <parameter>startpqf</parameter>.
815     If the operation was successful, the size of the scan set can be
816     retrieved by a call to <function>ZOOM_scanset_size</function>.
817     Like result sets, the items are numbered 0,..size-1.
818     To obtain information about a particular scan term, call function
819     <function>ZOOM_scanset_term</function>. This function takes
820     a scan set offset <literal>pos</literal> and returns a pointer
821     to a <emphasis>raw term</emphasis> or <literal>NULL</literal> if
822     non-present.
823     If present, the <literal>occ</literal> and <literal>len</literal> 
824     are set to the number of occurrences and the length
825     of the actual term respectively.
826     <function>ZOOM_scanset_display_term</function> is similar to
827     <function>ZOOM_scanset_term</function> except that it returns
828     the <emphasis>display term</emphasis> rather than the raw term.
829     In a few cases, the term is different from display term. Always
830     use the display term for display and the raw term for subsequent
831     scan operations (to get more terms, next scan result, etc).
832    </para>
833    <para>
834     A scan set may be freed by a call to function
835     <function>ZOOM_scanset_destroy</function>.
836     Functions <function>ZOOM_scanset_option_get</function> and
837     <function>ZOOM_scanset_option_set</function> retrieves and sets
838     an option respectively.
839    </para>
840
841    <para>
842     The <parameter>startpqf</parameter> is a subset of PQF, namely
843     the Attributes+Term part. Multiple <literal>@attr</literal> can
844     be used. For example to scan in title (complete) phrases:
845     <literallayout>
846      @attr 1=4 @attr 6=2 "science o"
847     </literallayout>
848    </para>
849    
850    <table frame="top"><title>ZOOM Scan Set Options</title>
851     <tgroup cols="3">
852      <colspec colwidth="4*" colname="name"></colspec>
853      <colspec colwidth="7*" colname="description"></colspec>
854      <colspec colwidth="2*" colname="default"></colspec>
855      <thead>
856       <row>
857        <entry>Option</entry>
858        <entry>Description</entry>
859        <entry>Default</entry>
860       </row>
861      </thead>
862      <tbody>
863       <row><entry>
864         number</entry><entry>Number of Scan Terms requested in next scan.
865         After scan it holds the actual number of terms returned.
866        </entry><entry>10</entry></row>
867       <row><entry>
868         position</entry><entry>Preferred Position of term in response
869         in next scan; actual position after completion of scan.
870        </entry><entry>1</entry></row>
871       <row><entry>
872         stepSize</entry><entry>Step Size
873        </entry><entry>0</entry></row>
874       <row><entry>
875         scanStatus</entry><entry>An integer indicating the Scan Status
876         of last scan.
877        </entry><entry>0</entry></row>
878      </tbody>
879     </tgroup>
880    </table>
881   </sect1>
882
883   <sect1 id="zoom.ext"><title>Extended Services</title>
884    <para>
885     ZOOM offers an interface to a subset of the Z39.50 extended services
886     as well as a few privately defined ones:
887    </para>
888    <itemizedlist>
889     <listitem>
890      <para>
891       Z39.50 Item Order (ILL).
892       See <xref linkend="zoom.ext.itemorder"/>.
893      </para>
894     </listitem>
895     <listitem>
896      <para>
897       Record Update. This allows a client to insert, modify or delete
898       records.
899       See <xref linkend="zoom.ext.update"/>.
900      </para>
901     </listitem>
902     <listitem>
903      <para>
904       Database Create. This a non-standard feature. Allows a client
905       to create a database.
906       See <xref linkend="zoom.ext.dbcreate"/>.
907      </para>
908     </listitem>
909     <listitem>
910      <para>
911       Database Drop. This a non-standard feature. Allows a client
912       to delete/drop a database.
913       See <xref linkend="zoom.ext.dbdrop"/>.
914      </para>
915      </listitem>
916     <listitem>
917      <para>
918       Commit operation. This a non-standard feature. Allows a client
919       to commit operations.
920       See <xref linkend="zoom.ext.commit"/>.
921      </para>
922     </listitem>
923     <!-- all the ILL PDU options should go here too -->
924    </itemizedlist>
925    <para>
926     To create an extended service operation a <literal>ZOOM_package</literal>
927     must be created. The operation is a five step operation. The
928     package is created, package is configured by means of options,
929     the package is send, result is inspected (by means of options),
930     the package is destroyed.
931    </para>
932    <synopsis>
933     ZOOM_package ZOOM_connection_package(ZOOM_connection c,
934                                          ZOOM_options options);
935
936     const char *ZOOM_package_option_get(ZOOM_package p,
937                                         const char *key);
938     void ZOOM_package_option_set(ZOOM_package p, const char *key,
939                                  const char *val);
940     void ZOOM_package_send(ZOOM_package p, const char *type);
941
942     void ZOOM_package_destroy(ZOOM_package p);
943    </synopsis>
944    <para>
945     The <function>ZOOM_connection_package</function> creates a
946     package for the connection given using the options specified.
947    </para>
948    <para>
949     Functions <function>ZOOM_package_option_get</function> and
950     <function>ZOOM_package_option_set</function> gets and sets
951     options.
952    </para>
953    <para>
954     <function>ZOOM_package_send</function> sends
955     the package the via connection specified in 
956     <function>ZOOM_connection_package</function>.
957     The <parameter>type</parameter> specifies the actual extended service
958     package type to be sent.
959    </para>
960
961    <table frame="top"><title>Extended Service Common Options</title>
962     <tgroup cols="3">
963      <colspec colwidth="4*" colname="name"></colspec>
964      <colspec colwidth="7*" colname="description"></colspec>
965      <colspec colwidth="3*" colname="default"></colspec>
966      <thead>
967       <row>
968        <entry>Option</entry>
969        <entry>Description</entry>
970        <entry>Default</entry>
971       </row>
972      </thead>
973      <tbody>
974       <row>
975        <entry>package-name</entry>
976        <entry>Extended Service Request package name. Must be specified
977        as part of a request</entry>
978        <entry>none</entry>
979       </row>
980       <row>
981        <entry>user-id</entry>
982        <entry>User ID of Extended Service Package. Is a request option</entry>
983        <entry>none</entry>
984       </row>
985       <row>
986        <entry>function</entry>
987        <entry>
988         Function of package - one of <literal>create</literal>,
989         <literal>delete</literal>, <literal>modify</literal>. Is
990         a request option.
991        </entry>
992        <entry><literal>create</literal></entry>
993       </row>
994       <row>
995        <entry>targetReference</entry>
996        <entry>
997         Target Reference. This is part of the response as returned
998         by the server. Read it after a succesful operation.
999        </entry>
1000        <entry><literal>none</literal></entry>
1001       </row>
1002      </tbody>
1003     </tgroup>
1004    </table>
1005
1006    <sect2 id="zoom.ext.itemorder"><title>Item Order</title>
1007     <para>
1008      For Item Order, type must be set to <literal>itemorder</literal> in
1009      <function>ZOOM_package_send</function>.
1010     </para>
1011
1012     <table frame="top"><title>Item Order Options</title>
1013      <tgroup cols="3">
1014       <colspec colwidth="4*" colname="name"></colspec>
1015       <colspec colwidth="7*" colname="description"></colspec>
1016       <colspec colwidth="3*" colname="default"></colspec>
1017       <thead>
1018        <row>
1019         <entry>Option</entry>
1020         <entry>Description</entry>
1021         <entry>Default</entry>
1022        </row>
1023       </thead>
1024       <tbody>
1025        <row>
1026         <entry>contact-name</entry>
1027         <entry>ILL contact name</entry>
1028         <entry>none</entry>
1029        </row>
1030        <row>
1031         <entry>contact-phone</entry>
1032         <entry>ILL contact phone</entry>
1033         <entry>none</entry>
1034        </row>
1035        <row>
1036         <entry>contact-email</entry>
1037         <entry>ILL contact email</entry>
1038         <entry>none</entry>
1039        </row>
1040        <row>
1041         <entry>itemorder-item</entry>
1042         <entry>Position for item (record) requested. An integer</entry>
1043         <entry>1</entry>
1044        </row>
1045       </tbody>
1046      </tgroup>
1047     </table>
1048
1049    </sect2>
1050
1051    <sect2 id="zoom.ext.update"><title>Record Update</title>
1052     <para>
1053      For Record Update, type must be set to <literal>update</literal> in
1054      <function>ZOOM_package_send</function>.
1055     </para>
1056
1057     <table frame="top"><title>Record Update Options</title>
1058      <tgroup cols="3">
1059       <colspec colwidth="4*" colname="name"></colspec>
1060       <colspec colwidth="7*" colname="description"></colspec>
1061       <colspec colwidth="3*" colname="default"></colspec>
1062       <thead>
1063        <row>
1064         <entry>Option</entry>
1065         <entry>Description</entry>
1066         <entry>Default</entry>
1067        </row>
1068       </thead>
1069       <tbody>
1070        <row>
1071         <entry>action</entry>
1072         <entry>
1073          The update action. One of 
1074          <literal>specialUpdate</literal>,
1075          <literal>recordInsert</literal>,
1076          <literal>recordReplace</literal>,
1077          <literal>recordDelete</literal>,
1078          <literal>elementUpdate</literal>.
1079         </entry>
1080         <entry><literal>specialUpdate</literal></entry>
1081        </row>
1082        <row>
1083         <entry>recordIdOpaque</entry>
1084         <entry>Opaque Record ID</entry>
1085         <entry>none</entry>
1086        </row>
1087        <row>
1088         <entry>recordIdNumber</entry>
1089         <entry>Record ID number</entry>
1090         <entry>none</entry>
1091        </row>
1092        <row>
1093         <entry>record</entry>
1094         <entry>The record itself</entry>
1095         <entry>none</entry>
1096        </row>
1097        <row>
1098         <entry>syntax</entry>
1099         <entry>The record syntax (transfer syntax). Is a string that
1100          is a known record syntax.
1101         </entry>
1102         <entry>no syntax</entry>
1103        </row>
1104        <row>
1105         <entry>databaseName</entry>
1106         <entry>Database from connection object</entry>
1107         <entry>Default</entry>
1108        </row>
1109       </tbody>
1110      </tgroup>
1111     </table>
1112     
1113    </sect2>
1114
1115    <sect2 id="zoom.ext.dbcreate"><title>Database Create</title>
1116     <para>
1117      For Database Create, type must be set to <literal>create</literal> in
1118      <function>ZOOM_package_send</function>.
1119     </para>
1120     
1121     <table frame="top"><title>Database Create Options</title>
1122      <tgroup cols="3">
1123       <colspec colwidth="4*" colname="name"></colspec>
1124       <colspec colwidth="7*" colname="description"></colspec>
1125       <colspec colwidth="3*" colname="default"></colspec>
1126       <thead>
1127        <row>
1128         <entry>Option</entry>
1129         <entry>Description</entry>
1130         <entry>Default</entry>
1131        </row>
1132       </thead>
1133       <tbody>
1134        <row>
1135         <entry>databaseName</entry>
1136         <entry>Database from connection object</entry>
1137         <entry>Default</entry>
1138        </row>
1139       </tbody>
1140      </tgroup>
1141     </table>
1142    </sect2>
1143    
1144    <sect2 id="zoom.ext.dbdrop"><title>Database Drop</title>
1145     <para>
1146      For Database Drop, type must be set to <literal>drop</literal> in
1147      <function>ZOOM_package_send</function>.
1148     </para>
1149     
1150     <table frame="top"><title>Database Create Options</title>
1151      <tgroup cols="3">
1152       <colspec colwidth="4*" colname="name"></colspec>
1153       <colspec colwidth="7*" colname="description"></colspec>
1154       <colspec colwidth="3*" colname="default"></colspec>
1155       <thead>
1156        <row>
1157         <entry>Option</entry>
1158         <entry>Description</entry>
1159         <entry>Default</entry>
1160        </row>
1161       </thead>
1162       <tbody>
1163        <row>
1164         <entry>databaseName</entry>
1165         <entry>Database from connection object</entry>
1166         <entry>Default</entry>
1167        </row>
1168       </tbody>
1169      </tgroup>
1170     </table>
1171    </sect2>
1172    
1173    <sect2 id="zoom.ext.commit"><title>Commit Operation</title>
1174     <para>
1175      For Commit, type must be set to <literal>commit</literal> in
1176      <function>ZOOM_package_send</function>.
1177     </para>
1178    </sect2>
1179
1180    <sect2><title>Protocol behavior</title>
1181     <para>
1182      All the extended services are Z39.50-only.
1183     </para>
1184     <note>
1185      <para>
1186       The database create, drop and commit services are privately defined
1187       operations.
1188       Refer to <filename>esadmin.asn</filename> in YAZ for the ASN.1
1189       definitions.
1190      </para>
1191     </note>
1192    </sect2>
1193   </sect1>
1194
1195   <sect1 id="zoom.options"><title>Options</title>
1196    <para>
1197     Most &zoom; objects provide a way to specify options to change behavior.
1198     From an implementation point of view a set of options is just like
1199     an associative array / hash.
1200    </para>
1201    <synopsis>
1202      ZOOM_options ZOOM_options_create (void);
1203
1204      ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent);
1205
1206      void ZOOM_options_destroy (ZOOM_options opt);
1207    </synopsis>
1208    <synopsis>
1209      const char *ZOOM_options_get (ZOOM_options opt, const char *name);
1210
1211      void ZOOM_options_set (ZOOM_options opt, const char *name,
1212                             const char *v);
1213    </synopsis>
1214    <synopsis>
1215      typedef const char *(*ZOOM_options_callback)
1216                                      (void *handle, const char *name);
1217
1218      ZOOM_options_callback
1219              ZOOM_options_set_callback (ZOOM_options opt,
1220                                         ZOOM_options_callback c,
1221                                         void *handle);
1222    </synopsis>
1223   </sect1>
1224   <sect1 id="zoom.events"><title>Events</title>
1225    <para>
1226     If you're developing non-blocking applications, you have to deal 
1227     with events.
1228    </para>
1229    <synopsis>
1230     int ZOOM_event (int no, ZOOM_connection *cs);
1231    </synopsis>
1232    <para>
1233     The <function>ZOOM_event</function> executes pending events for
1234     a number of connections. Supply the number of connections in
1235     <literal>no</literal> and an array of connections in
1236     <literal>cs</literal> (<literal>cs[0] ... cs[no-1]</literal>).
1237     A pending event could be a sending a search, receiving a response,
1238     etc.
1239     When an event has occurred for one of the connections, this function
1240     returns a positive integer <literal>n</literal> denoting that an event
1241     occurred for connection <literal>cs[n-1]</literal>.
1242     When no events are pending for the connections, a value of zero is
1243     returned.
1244     To ensure that all outstanding requests are performed call this function
1245     repeatedly until zero is returned.
1246    </para>
1247    <para>
1248     If <function>ZOOM_event</function> returns and returns non-zero, the
1249     last event that occurred can be expected.
1250    </para>
1251    <synopsis>
1252     int ZOOM_connection_last_event(ZOOM_connection cs);
1253    </synopsis>
1254    <para>
1255     <function>ZOOM_connection_last_event</function> returns an event type
1256     (integer) for the last event.
1257    </para>
1258
1259    <table frame="top"><title>ZOOM Event IDs</title>
1260     <tgroup cols="2">
1261      <colspec colwidth="4*" colname="name"></colspec>
1262      <colspec colwidth="7*" colname="description"></colspec>
1263      <thead>
1264       <row>
1265        <entry>Event</entry>
1266        <entry>Description</entry>
1267       </row>
1268      </thead>
1269      <tbody>
1270       <row>
1271        <entry>ZOOM_EVENT_NONE</entry>
1272        <entry>No event has occurred</entry>
1273       </row>
1274       <row>
1275        <entry>ZOOM_EVENT_CONNECT</entry>
1276        <entry>TCP/IP connect has initiated</entry>
1277       </row>
1278       <row>
1279        <entry>ZOOM_EVENT_SEND_DATA</entry>
1280        <entry>Data has been transmitted (sending)</entry>
1281       </row>
1282       <row>
1283        <entry>ZOOM_EVENT_RECV_DATA</entry>
1284        <entry>Data has been received)</entry>
1285       </row>
1286       <row>
1287        <entry>ZOOM_EVENT_TIMEOUT</entry>
1288        <entry>Timeout</entry>
1289       </row>
1290       <row>
1291        <entry>ZOOM_EVENT_UNKNOWN</entry>
1292        <entry>Unknown event</entry>
1293       </row>
1294       <row>
1295        <entry>ZOOM_EVENT_SEND_APDU</entry>
1296        <entry>An APDU has been transmitted (sending)</entry>
1297       </row>
1298       <row>
1299        <entry>ZOOM_EVENT_RECV_APDU</entry>
1300        <entry>An APDU has been received</entry>
1301       </row>
1302       <row>
1303        <entry>ZOOM_EVENT_RECV_RECORD</entry>
1304        <entry>A result-set record has been received</entry>
1305       </row>
1306       <row>
1307        <entry>ZOOM_EVENT_RECV_SEARCH</entry>
1308        <entry>A search result been received</entry>
1309       </row>
1310      </tbody>
1311     </tgroup>
1312    </table>
1313   </sect1>
1314  </chapter>
1315  
1316  <!-- Keep this comment at the end of the file
1317  Local variables:
1318  mode: sgml
1319  sgml-omittag:t
1320  sgml-shorttag:t
1321  sgml-minimize-attributes:nil
1322  sgml-always-quote-attributes:t
1323  sgml-indent-step:1
1324  sgml-indent-data:t
1325  sgml-parent-document: "yaz.xml"
1326  sgml-local-catalogs: nil
1327  sgml-namecase-general:t
1328  End:
1329  -->
1330