Added a section about how to install a Pazpar2 interface test1.
[pazpar2-moved-to-github.git] / doc / book.xml
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1//EN"
3     "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" 
4 [
5      <!ENTITY % local SYSTEM "local.ent">
6      %local;
7      <!ENTITY % entities SYSTEM "entities.ent">
8      %entities;
9      <!ENTITY % idcommon SYSTEM "common/common.ent">
10      %idcommon;
11 ]>
12 <!-- $Id: book.xml,v 1.19 2007-06-20 08:22:13 adam Exp $ -->
13 <book id="book">
14  <bookinfo>
15   <title>Pazpar2 - User's Guide and Reference</title>
16   <author>
17    <firstname>Sebastian</firstname><surname>Hammer</surname>
18   </author>
19   <author>
20    <firstname>Adam</firstname><surname>Dickmeiss</surname>
21   </author>
22   <author>
23    <firstname>Marc</firstname><surname>Cromme</surname>
24   </author>
25   <releaseinfo>&version;</releaseinfo>
26   <copyright>
27    <year>&copyright-year;</year>
28    <holder>Index Data</holder>
29   </copyright>
30   <abstract>
31    <simpara>
32     Pazpar2 is a high-performance, user interface-independent, data
33     model-independent metasearching
34     middle-ware featuring merging, relevance ranking, record sorting, 
35     and faceted results.
36    </simpara>
37    <simpara>
38     This document is a guide and reference to Pazpar version &version;.
39    </simpara>
40    <simpara>
41     <inlinemediaobject>
42      <imageobject>
43       <imagedata fileref="common/id.png" format="PNG"/>
44    </imageobject>
45     <imageobject>
46      <imagedata fileref="common/id.eps" format="EPS"/>
47    </imageobject>
48    </inlinemediaobject>
49    </simpara>
50   </abstract>
51  </bookinfo>
52  
53  <chapter id="introduction">
54   <title>Introduction</title>
55   <para>
56    Pazpar2 is a stand-alone metasearch client with a web-service API, designed
57    to be used either from a browser-based client (JavaScript, Flash, Java,
58    etc.), from from server-side code, or any combination of the two.
59    Pazpar2 is a highly optimized client designed to
60    search many resources in parallel. It implements record merging,
61    relevance-ranking and sorting by arbitrary data content, and facet
62    analysis for browsing purposes. It is designed to be data model
63    independent, and is capable of working with MARC, DublinCore, or any
64    other <ulink url="&url.xml;">XML</ulink>-structured response format
65    -- <ulink url="&url.xslt;">XSLT</ulink> is used to normalize and extract
66    data from retrieval records for display and analysis. It can be used
67    against any server which supports the 
68    <ulink url="&url.z39.50;">Z39.50</ulink> protocol. Proprietary
69    backend modules can be used to support a large number of other protocols
70    (please contact Index Data for further information about this).
71   </para>
72   <para>
73    Additional functionality such as
74    user management, attractive displays are expected to be implemented by
75    applications that use Pazpar2. Pazpar2 is user interface independent.
76    Its functionality is exposed through a simple REST-style web-service API,
77    designed to be simple to use from an Ajax-enabled browser, Flash
78    animation, Java applet, etc., or from a higher-level server-side language
79    like PHP or Java. Because session information can be shared between
80    browser-based logic and your server-side scripting, there is tremendous
81    flexibility in how you implement your business logic on top of Pazpar2.
82   </para>
83   <para>
84    Once you launch a search in Pazpar2, the operation continues behind the
85    scenes. Pazpar2 connects to servers, carries out searches, and
86    retrieves, deduplicates, and stores results internally. Your application
87    code may periodically inquire about the status of an ongoing operation,
88    and ask to see records or other result set facets. Result become
89    available immediately, and it is easy to build end-user interfaces which
90    feel extremely responsive, even when searching more than 100 servers
91    concurrently.
92   </para>
93   <para>
94    Pazpar2 is designed to be highly configurable. Incoming records are
95    normalized to XML/UTF-8, and then further normalized using XSLT to a
96    simple internal representation that is suitable for analysis. By
97    providing XSLT stylesheets for different kinds of result records, you
98    can tune Pazpar2 to work against different kinds of information
99    retrieval servers. Finally, metadata is extracted, in a configurable
100    way, from this internal record, to support display, merging, ranking,
101    result set facets, and sorting. Pazpar2 is not bound to a specific model
102    of metadata, such as DublinCore or MARC -- by providing the right
103    configuration, it can work with a number of different kinds of data in
104    support of many different applications.
105   </para>
106   <para>
107    Pazpar2 is designed to be efficient and scalable. You can set it up to
108    search several hundred targets in parallel, or you can use it to support
109    hundreds of concurrent users. It is implemented with the same attention
110    to performance and economy that we use in our indexing engines, so that
111    you can focus on building your application, without worrying about the
112    details of metasearch logic. You can devote all of your attention to
113    usability and let Pazpar2 do what it does best -- metasearch.
114   </para>
115   <para>
116    If you wish to connect to commercial or other databases which do not
117    support open standards, please contact Index Data. We have a licensing
118    agreement with a third party vendor which will enable Pazpar2 to access
119    thousands of online databases, in addition the vast number of catalogs
120    and online services that support the Z39.50 protocol.
121   </para>
122   <para>
123    Pazpar2 is our attempt to re-think the traditional paradigms for
124    implementing and deploying metasearch logic, with an uncompromising
125    approach to performance, and attempting to make maximum use of the
126    capabilities of modern browsers. The demo user interface that
127    accompanies the distribution is but one example. If you think of new
128    ways of using Pazpar2, we hope you'll share them with us, and if we
129    can provide assistance with regards to training, design, programming,
130    integration with different backends, hosting, or support, please don't
131    hesitate to contact us. If you'd like to see functionality in Pazpar2
132    that is not there today, please don't hesitate to contact us. It may
133    already be in our development pipeline, or there might be a
134    possibility for you to help out by sponsoring development time or
135    code. Either way, get in touch and we will give you straight answers.
136   </para>
137   <para>
138    Enjoy!
139   </para>
140   <para>
141    Pazpar2 is covered by the GNU license version 2.
142    See <xref linkend="license"/> for further information.
143   </para>
144  </chapter>
145
146  <chapter id="installation">
147   <title>Installation</title>
148   <para>
149    The Pazpar2 package very small. It includes documentation as well
150    as the Pazpar2 server. The package also includes a simple user
151    interface test1 which consists of a single HTML page and a single
152    JavaScript file to illustrate the use of Pazpar2.
153   </para>
154   <para>
155    Pazpar2 depends on the following tools/libraries:
156    <variablelist>
157     <varlistentry><term><ulink url="&url.yaz;">YAZ</ulink></term>
158      <listitem>
159       <para>
160        The popular Z39.50 toolkit for the C language.
161        YAZ <emphasis>must</emphasis> be compiled with Libxml2/Libxslt support.
162       </para>
163      </listitem>
164     </varlistentry>
165     <varlistentry><term><ulink url="&url.icu;">International
166        Components for Unicode (ICU)</ulink></term>
167      <listitem>
168       <para>
169        ICU provides Unicode support for non-English languages with
170        character sets outside the range of 7bit ASCII, like
171        Greek, Russian, German and French. Pazpar2 uses the ICU
172        Unicode character conversions, Unicode normalization, case
173        folding and other fundamental operations needed in
174        tokenization, normalization and ranking of records. 
175       </para>
176       <para>
177        Compiling, linking, and usage of the ICU libraries is optional,
178        but strongly recommended for usage in an international
179        environment.  
180       </para>
181      </listitem>
182     </varlistentry>
183    </variablelist>
184   </para>
185   <para>
186    In order to compile Pazpar2 an ANSI C compiler is
187    required. The requirements should be the same as for YAZ.
188   </para>
189
190   <section id="installation.unix">
191    <title>Installation on Unix (from Source)</title>
192    <para>
193     The latest source code for Pazpar2 is available from
194     <ulink url="&url.pazpar2.download;"/>.
195      Only few systems have none of the required
196      tools binary packages.
197      If, for example, Libxml2/libXSLT libraries
198     are already installed as development packages use these.
199    </para>
200    
201    <para>
202     Ensure that the development libraries + header files are
203     available on your system before compiling Pazpar2. For installation
204     of YAZ, refer to the YAZ installation chapter.
205    </para>
206    <screen>
207     gunzip -c pazpar2-version.tar.gz|tar xf -
208     cd pazpar2-version
209     ./configure
210     make
211     su
212     make install
213    </screen>
214    <para>
215     The <literal>make install</literal> will install manpages as well as the
216     Pazpar2 server, <literal>pazpar2</literal>, 
217     in PREFIX<literal>/sbin</literal>.
218     By default, PREFIX is <literal>/usr/local/</literal> . This can be
219     changed with configure option <option>--prefix</option>.
220    </para>
221   </section>
222
223   <section id="installation.test1">
224    <title>Installation of test1 interface</title>
225    <para>
226     In this section we outline how to install a simple interface that
227     is part of the Pazpar2 source package. Note that Debian users can
228     save time by just installing package <literal>pazpar2-test1</literal>.
229    </para>
230    <para>
231     A web server must be installed and running on the system, such as Apache.
232    </para>
233
234    <para>
235     Start the Pazpar2 daemon using the 'in-source' binary of the Pazpar2
236     daemon.
237     <screen>
238      cd etc
239      cp pazpar2.cfg.dist pazpar2.cfg
240      ../src/pazpar2 -f pazpar2.cfg -t edu.xml
241     </screen>
242     This will start a Pazpar2 listener on port 8004. It will proxy 
243     HTTP requests to localhost - port 80, which we asssume will be the regular
244     HTTP server on the system. Inspect and modify pazpar2.cfg as needed
245     if this is to be changed. Make a new console and move to the 
246     other stuff. For installation of Pazpar2 as a daemon, refer to the
247     manpage of Pazpar2.
248    </para>
249
250    <para>
251     The test1 UI is located in <literal>www/test1</literal>. Ensure this
252     directory is available to the web server by either copying 
253     <literal>test1</literal> to the document root, create a symlink or
254     use Apache's <literal>Alias</literal> directive.
255    </para>
256
257    <para>
258     The interface test1 interface should now be available on port 8004.
259    </para>
260    <para>
261     If you don't see the test1 interface. See if test1 is really available
262     on the same URL but on port 80. If it's not, the Apache configuration
263     (or other) is not correct. 
264    </para>
265    <para>
266     In order to use Apache as frontend for the interface on port 80
267     for public access etc., refer to 
268     <xref linkend="installation.apache2proxy"/>.
269    </para>
270   </section>
271
272   <section id="installation.debian">
273    <title>Installation on Debian GNU/Linux</title>
274    <para>
275     Index Data provides Debian packages for Pazpar2. These are prepared
276     for Debian versions Etch and Lenny (as of 2007).
277     Theses packages are available at
278     <ulink url="&url.pazpar2.download.debian;"/>.
279    </para>
280   </section>
281
282   <section id="installation.apache2proxy">
283    <title>Apache 2 Proxy</title>
284    <para>
285     Apache 2 has a 
286     <ulink url="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html">
287      proxy module
288     </ulink> which allows Pazpar2 to become a backend to an Apache 2
289     based web service. The Apache 2 proxy must operate in the
290     <emphasis>Reverse</emphasis> Proxy mode.
291    </para>
292    
293    <para>
294     On a Debian based Apache 2 system, the relevant modules can
295     be enabled with:
296     <screen>
297      sudo a2enmod proxy_http
298     </screen>
299    </para>
300
301    <para>
302     Traditionally Pazpar2 interprets URL paths with suffix 
303     <literal>/search.pz2</literal>.
304     The 
305     <ulink 
306      url="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass"
307      >ProxyPass</ulink> directive of Apache must be used to map a URL path
308     the the Pazpar2 server (listening port).
309    </para>
310
311    <note>
312     <para>
313      The ProxyPass directive takes a prefix rather than
314      a suffix as URL path. It is important that the Java Script code
315      uses the prefix given for it.
316     </para>
317    </note>
318
319    <example id="installation.apache2proxy.example">
320     <title>Apache 2 proxy configuration</title>
321     <para>
322      If Pazpar2 is running on port 8004 and the portal is using
323      <filename>search.pz2</filename> inside portal in directory
324      <filename>/myportal/</filename> we could use the following
325      Apache 2 configuration:
326
327      <screen><![CDATA[
328       <IfModule mod_proxy.c>
329        ProxyRequests Off
330       
331        <Proxy *>
332         AddDefaultCharset off
333         Order deny,allow
334         Allow from all
335        </Proxy>
336       
337        ProxyPass /myportal/search.pz2 http://localhost:8004/search.pz2
338        ProxyVia Off
339       </IfModule>
340       ]]></screen>
341     </para>
342    </example>
343   </section>
344
345  </chapter>
346
347  <chapter id="using">
348   <title>Using Pazpar2</title>
349   <para>
350    This chapter provides a general introduction to the use and
351    deployment of Pazpar2. 
352   </para>
353
354   <section id="architecture">
355    <title>Pazpar2 and your systems architecture</title>
356    <para>
357     Pazpar2 is designed to provide asynchronous, behind-the-scenes
358     metasearching functionality to your application, exposing this
359     functionality using a simple webservice API that can be accessed
360     from any number of development environments. In particular, it is
361     possible to combine Pazpar2 either with your server-side dynamic
362     website scripting, with scripting or code running in the browser, or
363     with any combination of the two. Pazpar2 is an excellent tool for
364     building advanced, Ajax-based user interfaces for metasearch
365     functionality, but it isn't a requirement -- you can choose to use
366     Pazpar2 entirely as a backend to your regular server-side scripting.
367     When you do use Pazpar2 in conjunction
368     with browser scripting (JavaScript/Ajax, Flash, applets,
369     etc.), there are    special considerations.
370    </para>
371
372    <para>
373     Pazpar2 implements a simple but efficient HTTP server, and it is
374     designed to interact directly with scripting running in the browser
375     for the best possible performance, and to limit overhead when
376     several browser clients generate numerous webservice requests.
377     However, it is still desirable to use a conventional webserver,
378     such as Apache, to serve up graphics, HTML documents, and
379     server-side scripting. Because the security sandbox environment of
380     most browser-side programming environments only allows communication
381     with the server from which the enclosing HTML page or object
382     originated, Pazpar2 is designed so that it can act as a transparent
383     proxy in front of an existing webserver (see <xref
384      linkend="pazpar2_conf"/> for details). 
385     In this mode, all regular
386     HTTP requests are transparently passed through to your webserver,
387     while Pazpar2 only intercepts search-related webservice requests.
388    </para>
389
390    <para>
391     If you want to expose your combined service on port 80, you can
392     either run your regular webserver on a different port, a different
393     server, or a different IP address associated with the same server.
394    </para>
395
396    <para>
397     Pazpar2 can also work behind
398     a reverse Proxy. Refer to <xref linkend="installation.apache2proxy"/>)
399     for more information.
400     This allows your existing HTTP server to operate on port 80 as usual.
401     Pazpar2 can be started on another (internal) port.
402    </para>
403
404    <para>
405     Sometimes, it may be necessary to implement functionality on your
406     regular webserver that makes use of search results, for example to
407     implement data import functionality, emailing results, history
408     lists, personal citation lists, interlibrary loan functionality
409     ,etc. Fortunately, it is simple to exchange information between
410     Pazpar2, your browser scripting, and backend server-side scripting.
411     You can send a session ID and possibly a record ID from your browser
412     code to your server code, and from there use Pazpar2s webservice API
413     to access result sets or individual records. You could even 'hide'
414     all of Pazpar2s functionality between your own API implemented on
415     the server-side, and access that from the browser or elsewhere. The
416     possibilities are just about endless.
417    </para>
418   </section>
419
420   <section id="data_model">
421    <title>Your data model</title>
422    <para>
423     Pazpar2 does not have a preconceived model of what makes up a data
424     model. There are no assumption that records have specific fields or
425     that they are organized in any particular way. The only assumption
426     is that data comes packaged in a form that the software can work
427     with (presently, that means XML or MARC), and that you can provide
428     the necessary information to massage it into Pazpar2's internal
429     record abstraction.
430    </para>
431
432    <para>
433     Handling retrieval records in Pazpar2 is a two-step process. First,
434     you decide which data elements of the source record you are
435     interested in, and you specify any desired massaging or combining of
436     elements using an XSLT stylesheet (MARC records are automatically
437     normalized to MARCXML before this step). If desired, you can run
438     multiple XSLT stylesheets in series to accomplish this, but the
439     output of the last one should be a representation of the record in a
440     schema that Pazpar2 understands.
441    </para>
442
443    <para>
444     The intermediate, internal representation of the record looks like
445     this:
446     <screen><![CDATA[
447      <record   xmlns="http://www.indexdata.com/pazpar2/1.0"
448      mergekey="title The Shining author King, Stephen">
449
450      <metadata type="title">The Shining</metadata>
451
452      <metadata type="author">King, Stephen</metadata>
453
454      <metadata type="kind">ebook</metadata>
455
456      <!-- ... and so on -->
457     </record>
458      ]]></screen>
459
460     As you can see, there isn't much to it. There are really only a few
461     important elements to this file.
462    </para>
463
464    <para>
465     Elements should belong to the namespace
466     <literal>http://www.indexdata.com/pazpar2/1.0</literal>.
467     If the root node contains the
468     attribute 'mergekey', then every record that generates the same
469     merge key (normalized for case differences, white space, and
470     truncation) will be joined into a cluster. In other words, you
471     decide how records are merged. If you don't include a merge key,
472     records are never merged. The 'metadata' elements provide the meat
473     of the elements -- the content. the 'type' attribute is used to
474     match each element against processing rules that determine what
475     happens to the data element next.
476    </para>
477
478    <para>
479     The next processing step is the extraction of metadata from the
480     intermediate representation of the record. This is governed by the
481     'metadata' elements in the 'service' section of the configuration
482     file. See <xref linkend="config-server"/> for details. The metadata
483     in the retrieval record ultimately drives merging, sorting, ranking,
484     the extraction of browse facets, and display, all configurable.
485    </para>
486   </section>
487
488   <section id="client">
489    <title>Client development overview</title>
490    <para>
491     You can use Pazpar2 from any environment that allows you to use
492     webservices. The initial goal of the software was to support
493     Ajax-based applications, but there literally are no limits to what
494     you can do. You can use Pazpar2 from Javascript, Flash, Java, etc.,
495     on the browser side, and from any development environment on the
496     server side, and you can pass session tokens and record IDs freely
497     around between these environments to build sophisticated applications.
498     Use your imagination.
499    </para>
500
501    <para>
502     The webservice API of Pazpar2 is described in detail in <xref
503      linkend="pazpar2_protocol"/>.
504    </para>
505
506    <para>
507     In brief, you use the 'init' command to create a session, a
508     temporary workspace which carries information about the current
509     search. You start a new search using the 'search' command. Once the
510     search has been started, you can follow its progress using the
511     'stat', 'bytarget', 'termlist', or 'show' commands. Detailed records
512     can be fetched using the 'record' command.
513    </para>
514   </section>
515
516   <section id="nonstandard">
517    <title>Connecting to non-standard resources</title>
518    <para>
519     Pazpar2 uses Z39.50 as its switchboard language -- i.e. as far as it
520     is concerned, all resources speak Z39.50. It is, however, equipped
521     to handle a broad range of different server behavior, through
522     configurable query mapping and record normalization. If you develop
523     configuration, stylesheets, etc., for a new type of resources, we
524     encourage you to share your work. But you can also use Pazpar2 to
525     connect to hundreds of resources that do not support standard
526     protocols.
527    </para>
528
529    <para>
530     For a growing number of resources, Z39.50 is all you need. Over the
531     last few years, a number of commercial, full-text resources have
532     implemented Z39.50. These can be used through Pazpar2 with little or
533     no effort. Resources that use non-standard record formats will
534     require a bit of XSLT work, but that's all.
535    </para>
536
537    <para>
538     But what about resources that don't support Z39.50 at all? The NISO
539     SRU (MXG) protocol is slowly gathering steam. Other resources might
540     support OpenSearch, private, XML/HTTP-based protocols, or something
541     else entirely. Some databases exist only as web user interfaces and
542     will require screen-scraping. Still others exist only as static
543     files, or perhaps as databases supporting the OAI-PMH protocol.
544     There is hope! Read on.
545    </para>
546
547    <para>
548     Index Data continues to advocate the support of open standards. We
549     work with database vendors to support standards, so you don't have
550     to worry about programming against non-standard services. We also
551     provide tools (see <ulink
552      url="http://www.indexdata.com/simpleserver">SimpleServer</ulink>)
553     which make it comparatively easy to build gateways against servers
554     with non-standard behavior. Again, we encourage you to share any
555     work you do in this direction.
556    </para>
557
558    <para>
559     But the bottom line is that working with non-standard resources in
560     metasearching is really, really hard. If you want to build a
561     project with Pazpar2, and you need access to resources with
562     non-standard interfaces, we can help. We run gateways to more than
563     2,000 popular, commercial databases and other resources,
564     making it simple 
565     to plug them directly into Pazpar2. For a small annual fee per
566     database, we can help you establish connections to your licensed
567     resources. Meanwhile, you can help! If you build your own
568     standards-compliant gateways, host them for others, or share the
569     code! And tell your vendors that they can save everybody money and
570     increase the appeal of their resources by supporting standards.
571    </para>
572
573    <para>
574     There are those who will ask us why we are using Z39.50 as our
575     switchboard language rather than a different protocol. Basically,
576     we believe that Z39.50 is presently the most widely implemented 
577     information retrieval protocol that has the level of functionality
578     required to support a good metasearching experience (structured
579     searching, structured, well-defined results). It is also compact and
580     efficient, and there is a very broad range of tools available to
581     implement it.
582    </para>
583   </section>
584
585   <section id="unicode">
586    <title>Unicode Compliance</title>
587    <para>
588     Pazpar2 is Unicode compliant and language and locale aware but relies
589     on character encoding for the targets to be specified correctly if
590     the targets themselves are not UTF-8 based (most aren't).
591     Just a few bad behaving targets can spoil the search experience
592     considerably if for example Greek, Russian or otherwise non 7-bit ASCII
593     search terms are entered. In these cases some targets return
594     records irrelevant to the query, and the result screens will be
595     cluttered with noise.
596    </para>
597    <para>
598     While noise from misbehaving targets can not be removed, it can
599     be reduced using truly Unicode based ranking. This is an
600     option which is available to the system administrator if ICU
601     support is compiled into Pazpar2, see
602     <xref linkend="installation"/> for details.
603    </para>
604    <para>
605     In addition, the ICU tokenization and normalization rules must
606     be defined in the master configuration file described in 
607     <xref linkend="config-server"/>.
608    </para>
609   </section>
610
611  </chapter> <!-- Using Pazpar2 -->
612
613  <reference id="reference">
614   <title>Reference</title>
615   <partintro id="reference-introduction">
616    <para>
617     The material in this chapter is drawn directly from the individual
618     manual entries.
619    </para>
620   </partintro>
621   &manref;
622  </reference>
623
624  <appendix id="license"><title>License</title>
625   
626   <section id="gpl"><title>GPL</title>
627    
628    <para>
629     Pazpar2,
630     Copyright &copy; &copyright-year; Index Data.
631    </para>
632    
633    <para>
634     Pazpar2 is free software; you can redistribute it and/or modify it under
635     the terms of the GNU General Public License as published by the Free
636     Software Foundation; either version 2, or (at your option) any later
637     version.
638    </para>
639    
640    <para>
641     Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
642     WARRANTY; without even the implied warranty of MERCHANTABILITY or
643     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
644     for more details.
645    </para>
646    
647    <para>
648     You should have received a copy of the GNU General Public License
649     along with Pazpar2; see the file LICENSE.  If not, write to the
650     Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
651     02111-1307, USA.
652    </para>
653    
654    <screen>
655                     GNU GENERAL PUBLIC LICENSE
656                        Version 2, June 1991
657
658  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
659      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
660  Everyone is permitted to copy and distribute verbatim copies
661  of this license document, but changing it is not allowed.
662
663                             Preamble
664
665   The licenses for most software are designed to take away your
666 freedom to share and change it.  By contrast, the GNU General Public
667 License is intended to guarantee your freedom to share and change free
668 software--to make sure the software is free for all its users.  This
669 General Public License applies to most of the Free Software
670 Foundation's software and to any other program whose authors commit to
671 using it.  (Some other Free Software Foundation software is covered by
672 the GNU Library General Public License instead.)  You can apply it to
673 your programs, too.
674
675   When we speak of free software, we are referring to freedom, not
676 price.  Our General Public Licenses are designed to make sure that you
677 have the freedom to distribute copies of free software (and charge for
678 this service if you wish), that you receive source code or can get it
679 if you want it, that you can change the software or use pieces of it
680 in new free programs; and that you know you can do these things.
681
682   To protect your rights, we need to make restrictions that forbid
683 anyone to deny you these rights or to ask you to surrender the rights.
684 These restrictions translate to certain responsibilities for you if you
685 distribute copies of the software, or if you modify it.
686
687   For example, if you distribute copies of such a program, whether
688 gratis or for a fee, you must give the recipients all the rights that
689 you have.  You must make sure that they, too, receive or can get the
690 source code.  And you must show them these terms so they know their
691 rights.
692
693   We protect your rights with two steps: (1) copyright the software, and
694 (2) offer you this license which gives you legal permission to copy,
695 distribute and/or modify the software.
696
697   Also, for each author's protection and ours, we want to make certain
698 that everyone understands that there is no warranty for this free
699 software.  If the software is modified by someone else and passed on, we
700 want its recipients to know that what they have is not the original, so
701 that any problems introduced by others will not reflect on the original
702 authors' reputations.
703
704   Finally, any free program is threatened constantly by software
705 patents.  We wish to avoid the danger that redistributors of a free
706 program will individually obtain patent licenses, in effect making the
707 program proprietary.  To prevent this, we have made it clear that any
708 patent must be licensed for everyone's free use or not licensed at all.
709
710   The precise terms and conditions for copying, distribution and
711 modification follow.
712
713                     GNU GENERAL PUBLIC LICENSE
714    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
715
716   0. This License applies to any program or other work which contains
717 a notice placed by the copyright holder saying it may be distributed
718 under the terms of this General Public License.  The "Program", below,
719 refers to any such program or work, and a "work based on the Program"
720 means either the Program or any derivative work under copyright law:
721 that is to say, a work containing the Program or a portion of it,
722 either verbatim or with modifications and/or translated into another
723 language.  (Hereinafter, translation is included without limitation in
724 the term "modification".)  Each licensee is addressed as "you".
725
726 Activities other than copying, distribution and modification are not
727 covered by this License; they are outside its scope.  The act of
728 running the Program is not restricted, and the output from the Program
729 is covered only if its contents constitute a work based on the
730 Program (independent of having been made by running the Program).
731 Whether that is true depends on what the Program does.
732
733   1. You may copy and distribute verbatim copies of the Program's
734 source code as you receive it, in any medium, provided that you
735 conspicuously and appropriately publish on each copy an appropriate
736 copyright notice and disclaimer of warranty; keep intact all the
737 notices that refer to this License and to the absence of any warranty;
738 and give any other recipients of the Program a copy of this License
739 along with the Program.
740
741 You may charge a fee for the physical act of transferring a copy, and
742 you may at your option offer warranty protection in exchange for a fee.
743
744   2. You may modify your copy or copies of the Program or any portion
745 of it, thus forming a work based on the Program, and copy and
746 distribute such modifications or work under the terms of Section 1
747 above, provided that you also meet all of these conditions:
748
749     a) You must cause the modified files to carry prominent notices
750     stating that you changed the files and the date of any change.
751
752     b) You must cause any work that you distribute or publish, that in
753     whole or in part contains or is derived from the Program or any
754     part thereof, to be licensed as a whole at no charge to all third
755     parties under the terms of this License.
756
757     c) If the modified program normally reads commands interactively
758     when run, you must cause it, when started running for such
759     interactive use in the most ordinary way, to print or display an
760     announcement including an appropriate copyright notice and a
761     notice that there is no warranty (or else, saying that you provide
762     a warranty) and that users may redistribute the program under
763     these conditions, and telling the user how to view a copy of this
764     License.  (Exception: if the Program itself is interactive but
765     does not normally print such an announcement, your work based on
766     the Program is not required to print an announcement.)
767
768 These requirements apply to the modified work as a whole.  If
769 identifiable sections of that work are not derived from the Program,
770 and can be reasonably considered independent and separate works in
771 themselves, then this License, and its terms, do not apply to those
772 sections when you distribute them as separate works.  But when you
773 distribute the same sections as part of a whole which is a work based
774 on the Program, the distribution of the whole must be on the terms of
775 this License, whose permissions for other licensees extend to the
776 entire whole, and thus to each and every part regardless of who wrote it.
777
778 Thus, it is not the intent of this section to claim rights or contest
779 your rights to work written entirely by you; rather, the intent is to
780 exercise the right to control the distribution of derivative or
781 collective works based on the Program.
782
783 In addition, mere aggregation of another work not based on the Program
784 with the Program (or with a work based on the Program) on a volume of
785 a storage or distribution medium does not bring the other work under
786 the scope of this License.
787
788   3. You may copy and distribute the Program (or a work based on it,
789 under Section 2) in object code or executable form under the terms of
790 Sections 1 and 2 above provided that you also do one of the following:
791
792     a) Accompany it with the complete corresponding machine-readable
793     source code, which must be distributed under the terms of Sections
794     1 and 2 above on a medium customarily used for software interchange; or,
795
796     b) Accompany it with a written offer, valid for at least three
797     years, to give any third party, for a charge no more than your
798     cost of physically performing source distribution, a complete
799     machine-readable copy of the corresponding source code, to be
800     distributed under the terms of Sections 1 and 2 above on a medium
801     customarily used for software interchange; or,
802
803     c) Accompany it with the information you received as to the offer
804     to distribute corresponding source code.  (This alternative is
805     allowed only for noncommercial distribution and only if you
806     received the program in object code or executable form with such
807     an offer, in accord with Subsection b above.)
808
809 The source code for a work means the preferred form of the work for
810 making modifications to it.  For an executable work, complete source
811 code means all the source code for all modules it contains, plus any
812 associated interface definition files, plus the scripts used to
813 control compilation and installation of the executable.  However, as a
814 special exception, the source code distributed need not include
815 anything that is normally distributed (in either source or binary
816 form) with the major components (compiler, kernel, and so on) of the
817 operating system on which the executable runs, unless that component
818 itself accompanies the executable.
819
820 If distribution of executable or object code is made by offering
821 access to copy from a designated place, then offering equivalent
822 access to copy the source code from the same place counts as
823 distribution of the source code, even though third parties are not
824 compelled to copy the source along with the object code.
825
826   4. You may not copy, modify, sublicense, or distribute the Program
827 except as expressly provided under this License.  Any attempt
828 otherwise to copy, modify, sublicense or distribute the Program is
829 void, and will automatically terminate your rights under this License.
830 However, parties who have received copies, or rights, from you under
831 this License will not have their licenses terminated so long as such
832 parties remain in full compliance.
833
834   5. You are not required to accept this License, since you have not
835 signed it.  However, nothing else grants you permission to modify or
836 distribute the Program or its derivative works.  These actions are
837 prohibited by law if you do not accept this License.  Therefore, by
838 modifying or distributing the Program (or any work based on the
839 Program), you indicate your acceptance of this License to do so, and
840 all its terms and conditions for copying, distributing or modifying
841 the Program or works based on it.
842
843   6. Each time you redistribute the Program (or any work based on the
844 Program), the recipient automatically receives a license from the
845 original licensor to copy, distribute or modify the Program subject to
846 these terms and conditions.  You may not impose any further
847 restrictions on the recipients' exercise of the rights granted herein.
848 You are not responsible for enforcing compliance by third parties to
849 this License.
850
851   7. If, as a consequence of a court judgment or allegation of patent
852 infringement or for any other reason (not limited to patent issues),
853 conditions are imposed on you (whether by court order, agreement or
854 otherwise) that contradict the conditions of this License, they do not
855 excuse you from the conditions of this License.  If you cannot
856 distribute so as to satisfy simultaneously your obligations under this
857 License and any other pertinent obligations, then as a consequence you
858 may not distribute the Program at all.  For example, if a patent
859 license would not permit royalty-free redistribution of the Program by
860 all those who receive copies directly or indirectly through you, then
861 the only way you could satisfy both it and this License would be to
862 refrain entirely from distribution of the Program.
863
864 If any portion of this section is held invalid or unenforceable under
865 any particular circumstance, the balance of the section is intended to
866 apply and the section as a whole is intended to apply in other
867 circumstances.
868
869 It is not the purpose of this section to induce you to infringe any
870 patents or other property right claims or to contest validity of any
871 such claims; this section has the sole purpose of protecting the
872 integrity of the free software distribution system, which is
873 implemented by public license practices.  Many people have made
874 generous contributions to the wide range of software distributed
875 through that system in reliance on consistent application of that
876 system; it is up to the author/donor to decide if he or she is willing
877 to distribute software through any other system and a licensee cannot
878 impose that choice.
879
880 This section is intended to make thoroughly clear what is believed to
881 be a consequence of the rest of this License.
882
883   8. If the distribution and/or use of the Program is restricted in
884 certain countries either by patents or by copyrighted interfaces, the
885 original copyright holder who places the Program under this License
886 may add an explicit geographical distribution limitation excluding
887 those countries, so that distribution is permitted only in or among
888 countries not thus excluded.  In such case, this License incorporates
889 the limitation as if written in the body of this License.
890
891   9. The Free Software Foundation may publish revised and/or new versions
892 of the General Public License from time to time.  Such new versions will
893 be similar in spirit to the present version, but may differ in detail to
894 address new problems or concerns.
895
896 Each version is given a distinguishing version number.  If the Program
897 specifies a version number of this License which applies to it and "any
898 later version", you have the option of following the terms and conditions
899 either of that version or of any later version published by the Free
900 Software Foundation.  If the Program does not specify a version number of
901 this License, you may choose any version ever published by the Free Software
902 Foundation.
903
904   10. If you wish to incorporate parts of the Program into other free
905 programs whose distribution conditions are different, write to the author
906 to ask for permission.  For software which is copyrighted by the Free
907 Software Foundation, write to the Free Software Foundation; we sometimes
908 make exceptions for this.  Our decision will be guided by the two goals
909 of preserving the free status of all derivatives of our free software and
910 of promoting the sharing and reuse of software generally.
911
912                             NO WARRANTY
913
914   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
915 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
916 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
917 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
918 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
919 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
920 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
921 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
922 REPAIR OR CORRECTION.
923
924   12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
925 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
926 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
927 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
928 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
929 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
930 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
931 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
932 POSSIBILITY OF SUCH DAMAGES.
933
934                      END OF TERMS AND CONDITIONS
935    </screen> 
936   </section>
937  </appendix>
938  
939 </book>
940
941  <!-- Keep this comment at the end of the file
942  Local variables:
943  mode: sgml
944  sgml-omittag:t
945  sgml-shorttag:t
946  sgml-minimize-attributes:nil
947  sgml-always-quote-attributes:t
948  sgml-indent-step:1
949  sgml-indent-data:t
950  sgml-parent-document: nil
951  sgml-local-catalogs: nil
952  sgml-namecase-general:t
953  End:
954  -->