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