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