df121fcb4b473637bcab5509dec83a28297803ea
[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    BIBFRAME records via SRU/Z39.50. By using the
56    <ulink
57        url="https://github.com/lcnetdev/marc2bibframe">
58     marc2bibframe
59     </ulink> utilities, this module can convert existing
60     MARCXML records to BIBFRAME records - on the fly - as part of retrieval.
61   </para>
62  </chapter>
63  <chapter id="installation">
64   <title>Installation</title>
65   <para>
66    MP-XQuery is available as packages for CentOS/RHEL 6 and most recent
67    Ubuntu/Debian versions. For other systems, the module must be build
68    from source.
69   </para>
70   <sect1 id="installation.packages">
71    <title>Installing packages</title>
72    <para>
73     You need to enable the relevant software repositories.
74     For setting up refer to one of:
75     <ulink
76         url="http://ftp.indexdata.dk/pub/mp-xquery/redhat/centos/6/README">CentOS 6</ulink>
77     ,
78     <ulink
79         url="http://ftp.indexdata.dk/pub/mp-xquery/ubuntu/README">CentOS </ulink>
80     and
81     <ulink
82         url="http://ftp.indexdata.dk/pub/mp-xquery/debian/README">Debian</ulink>
83    </para>
84    <para>
85     The package is called <literal>mp-sparql</literal> on RHEL/Debian systems.
86     Install that package and you are ready to use filter "xquery" in your
87     setup.
88    </para>
89   </sect1>
90   <sect1 id="installation.source">
91    <title>Installing from source</title>
92    <para>
93     To build from source, you need zorba and metaproxy development
94     packages. Zorba might be installed in <filename>/opt/zorba</filename>
95     as follows:
96     <screen>
97     tar zxf zorba-3.0.tar.gz
98     cd zorba-3.0
99     mkdir build
100     cd build
101     cmake -D -Wno-dev \
102         -D CMAKE_INSTALL_PREFIX=/opt/zorba \
103         -D ZORBA_SUPPRESS_SWIG:BOOL=ON  \
104         ..
105     sudo make install
106     </screen>
107     Consult the Zorba documentation for more information.
108    </para>
109    <para>
110     Metaproxy can be installed as follows:
111     <screen>
112      ./configure
113      make
114      sudo make install
115     </screen>
116     But consult the Metaproxy documentation for requirements and
117     options.
118    </para>
119    <para>
120     We are now ready to build the MP-XQuery module with:
121     <screen>
122      cd mp-xquery-version
123      make ZORBA=/opt/zorba MP_CONFIG=/usr/local/bin/mp-config
124     </screen>
125     Adjust <literal>ZORBA</literal> and <literal>MP_CONFIG</literal> values
126     above for the correct location of installed
127     Zorba and Metaproxy's mp-config respectively. MP_CONFIG can be omitted
128     if Metaproxy was installed in the system PATH.
129    </para>
130    <para>
131     You can now install the <filename>metaproxy_filter_xquery.so</filename>
132     in a directory searched by Metaproxy daemon.
133     Specifically, that's the directories
134     given by the <literal>dlpath</literal> configuration.
135    </para>
136    <para>
137     If dlpath includes <filename>/usr/lib/metaproxy6/modules</filename>,
138     the module can be installed with:
139     <screen>
140      cp src/metaproxy_filter_xquery.so /usr/lib/metaproxy6/modules
141     </screen>
142    </para>
143   </sect1>
144  </chapter>
145  <reference id="reference">
146   <title>Reference</title>
147    <partintro id="reference-introduction">
148     <para>
149      The material in this chapter is drawn directly from the individual
150      manual entries.
151     </para>
152    </partintro>
153    &manref;
154  </reference>
155
156  <appendix id="license">
157   <title>License</title>
158   <para>
159    Copyright (C) 2014-2015 Index Data
160   </para>
161
162   <para>
163    Metaproxy is free software; you can redistribute it and/or modify it under
164    the terms of the GNU General Public License as published by the Free
165    Software Foundation; either version 2, or (at your option) any later
166    version.
167    </para>
168
169   <para>
170    Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
171    WARRANTY; without even the implied warranty of MERCHANTABILITY or
172    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
173    for more details.
174   </para>
175
176   <para>
177    You should have received a copy of the GNU General Public License
178    along with Metaproxy; see the file LICENSE.  If not, write to the
179    Free Software Foundation,
180    51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
181    </para>
182
183  </appendix>
184
185  &gpl2;
186 </book>
187
188 <!-- Keep this comment at the end of the file
189 Local variables:
190 mode: nxml
191 nxml-child-indent: 1
192 End:
193 -->