0882990d726bd557e954a73ce12c43987998e7b8
[mp-xquery-moved-to-github.git] / doc / book.xml
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3     "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
4 [
5      <!ENTITY % local SYSTEM "local.ent">
6      %local;
7      <!ENTITY manref SYSTEM "manref.xml">
8      <!ENTITY gpl2 SYSTEM "gpl-2.0.xml">
9      <!ENTITY % idcommon SYSTEM "common/common.ent">
10      %idcommon;
11 ]>
12 <book>
13  <bookinfo>
14   <title>MP-XQuery - User's Guide and Reference</title>
15   <authorgroup>
16    <author>
17     <firstname>Adam</firstname><surname>Dickmeiss</surname>
18    </author>
19   </authorgroup>
20   <releaseinfo>&version;</releaseinfo>
21   <copyright>
22    <year>2014-2015</year>
23    <holder>Index Data</holder>
24   </copyright>
25   <abstract>
26    <simpara>
27     This manual is part of MP-XQuery version &version;.
28     </simpara>
29    <simpara>
30     MP-XQuery is a Metaproxy module that allows record conversion
31     using W3C's XQuery language.
32    </simpara>
33    <simpara>
34     MP-XQuery is covered by the GNU General Public License version 2.
35    </simpara>
36    <simpara>
37     <inlinemediaobject>
38      <imageobject>
39       <imagedata fileref="common/id.png" format="PNG"/>
40      </imageobject>
41      <imageobject>
42       <imagedata fileref="common/id.eps" format="EPS"/>
43      </imageobject>
44     </inlinemediaobject>
45    </simpara>
46   </abstract>
47  </bookinfo>
48  <chapter id="introduction">
49   <title>Introduction</title>
50   <para>
51    MP-XQuery is a <ulink url="&url.metaproxy;">Metaproxy</ulink> module
52    that allows record conversion using
53    <ulink url="http://www.w3.org/TR/xquery/">W3C XML XQuery</ulink>.
54    The initial motivations for the module was to be able to
55    <ulink url="http://bibframe.org">BIBFRAME</ulink> records
56    via SRU/Z39.50. By using the
57    <ulink
58        url="https://github.com/lcnetdev/marc2bibframe">
59     marc2bibframe
60     </ulink> utilities, this module can convert existing
61     MARCXML records to BIBFRAME records - on the fly - as part of retrieval.
62   </para>
63  </chapter>
64  <chapter id="installation">
65   <title>Installation</title>
66   <para>
67    MP-XQuery is available as packages for CentOS/RHEL 6 and most recent
68    Ubuntu/Debian versions. For other systems, the module must be build
69    from source.
70   </para>
71   <sect1 id="installation.packages">
72    <title>Installing packages</title>
73    <para>
74     You need to enable the relevant software repositories.
75     For setting up refer to one of:
76     <ulink
77         url="http://ftp.indexdata.dk/pub/mp-xquery/redhat/centos/6/README">CentOS 6</ulink>
78     ,
79     <ulink
80         url="http://ftp.indexdata.dk/pub/mp-xquery/ubuntu/README">Ubuntu</ulink>
81     and
82     <ulink
83         url="http://ftp.indexdata.dk/pub/mp-xquery/debian/README">Debian</ulink>
84    </para>
85    <para>
86     The package is called <literal>mp-xquery</literal> on RHEL/Debian systems.
87     Install that package and you are ready to use filter "xquery" in your
88     setup.
89    </para>
90   </sect1>
91   <sect1 id="installation.source">
92    <title>Installing from source</title>
93    <para>
94     To build from source, you need zorba and metaproxy development
95     packages. <ulink url="http://www.zorba.io">Zorba</ulink>
96     might be installed in <filename>/opt/zorba</filename> as follows:
97     <screen>
98     tar zxf zorba-3.0.tar.gz
99     cd zorba-3.0
100     mkdir build
101     cd build
102     cmake -Wno-dev \
103         -D CMAKE_INSTALL_PREFIX=/opt/zorba \
104         -D ZORBA_SUPPRESS_SWIG:BOOL=ON  \
105         ..
106     sudo make install
107     </screen>
108     Consult the Zorba documentation for more information.
109    </para>
110    <para>
111     Metaproxy can be installed as follows:
112     <screen>
113      ./configure
114      make
115      sudo make install
116     </screen>
117     But consult the Metaproxy documentation for requirements and
118     options.
119    </para>
120    <para>
121     We are now ready to build the MP-XQuery module with:
122     <screen>
123      cd mp-xquery-version
124      make ZORBA=/opt/zorba MP_CONFIG=/usr/local/bin/mp-config
125     </screen>
126     Adjust <literal>ZORBA</literal> and <literal>MP_CONFIG</literal> values
127     above for the correct location of installed
128     Zorba and Metaproxy's mp-config respectively. MP_CONFIG can be omitted
129     if Metaproxy was installed in the system PATH.
130    </para>
131    <para>
132     You can now install the <filename>metaproxy_filter_xquery.so</filename>
133     in a directory searched by Metaproxy daemon.
134     Specifically, that's the directories
135     given by the <literal>dlpath</literal> configuration.
136    </para>
137    <para>
138     If dlpath includes <filename>/usr/lib/metaproxy6/modules</filename>,
139     the module can be installed with:
140     <screen>
141      cp src/metaproxy_filter_xquery.so /usr/lib/metaproxy6/modules
142     </screen>
143    </para>
144    <note>
145     <para>
146      For RHEL/CentOS systems on 64-bit architectures, the correct paths is:
147      <filename>/usr/lib64/metaproxy6/modules</filename>.
148     </para>
149    </note>
150   </sect1>
151  </chapter>
152  <reference id="reference">
153   <title>Reference</title>
154    <partintro id="reference-introduction">
155     <para>
156      The material in this chapter is drawn directly from the individual
157      manual entries.
158     </para>
159    </partintro>
160    &manref;
161  </reference>
162
163  <appendix id="license">
164   <title>License</title>
165   <para>
166    Copyright (C) 2014-2015 Index Data
167   </para>
168
169   <para>
170    Metaproxy is free software; you can redistribute it and/or modify it under
171    the terms of the GNU General Public License as published by the Free
172    Software Foundation; either version 2, or (at your option) any later
173    version.
174    </para>
175
176   <para>
177    Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
178    WARRANTY; without even the implied warranty of MERCHANTABILITY or
179    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
180    for more details.
181   </para>
182
183   <para>
184    You should have received a copy of the GNU General Public License
185    along with Metaproxy; see the file LICENSE.  If not, write to the
186    Free Software Foundation,
187    51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
188    </para>
189
190  </appendix>
191
192  &gpl2;
193 </book>
194
195 <!-- Keep this comment at the end of the file
196 Local variables:
197 mode: nxml
198 nxml-child-indent: 1
199 End:
200 -->