X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=doc%2Fbook.xml;h=994e3d1f272b4da3594897c044fb296d1a88cd1d;hb=refs%2Fheads%2Fmaster;hp=4669bdd9ddfbbb5ad6131bb9c2a2060d54ece83f;hpb=b335d52a8220fc3623545f622aff883f1fbb77bd;p=mp-xquery-moved-to-github.git
diff --git a/doc/book.xml b/doc/book.xml
index 4669bdd..994e3d1 100644
--- a/doc/book.xml
+++ b/doc/book.xml
@@ -31,7 +31,7 @@
using W3C's XQuery language.
- Metaproxy is covered by the GNU General Public License version 2.
+ MP-XQuery is covered by the GNU General Public License version 2.
@@ -45,21 +45,195 @@
-
Introduction
-
- MP-XQuery is a module for
- Metaproxy.
+ MP-XQuery is a Metaproxy module
+ that allows record conversion using
+ W3C XML XQuery.
+ The initial motivations for the module was to be able to
+ BIBFRAME records
+ via SRU/Z39.50. By using the
+
+ marc2bibframe
+ utilities, this module can convert existing
+ MARCXML records to BIBFRAME records - on the fly - as part of retrieval.
-
Installation
-
+
+ MP-XQuery is available as packages for CentOS/RHEL 6 and most recent
+ Ubuntu/Debian versions. For other systems, the module must be build
+ from source.
+
+
+ Installing packages
+
+ You need to enable the relevant software repositories.
+ For setting up refer to one of:
+ CentOS 6
+ ,
+ CentOS 7
+ ,
+ Ubuntu
+ and
+ Debian
+
+
+ The package is called mp-xquery on RHEL/Debian systems.
+ Install that package and you are ready to use filter "xquery" in your
+ setup.
+
+
+
+ Installing from source
+
+ To build from source, you need zorba and metaproxy development
+ packages. Zorba
+ might be installed in /opt/zorba as follows:
+
+ tar zxf zorba-3.0.tar.gz
+ cd zorba-3.0
+ mkdir build
+ cd build
+ cmake -Wno-dev \
+ -D CMAKE_INSTALL_PREFIX=/opt/zorba \
+ -D ZORBA_SUPPRESS_SWIG:BOOL=ON \
+ ..
+ sudo make install
+
+ Consult the Zorba documentation for more information.
+
+
+ Some parts of Zorba require C++ 11 features. If the local C++
+ compiler does not offer this by default, you might have to add:
+
+ -D CMAKE_CXX_FLAGS=-std=c++11
+
+ to the cmake invokation. This is the case on MAC OS X with MacPorts.
+
+
+ Metaproxy can be installed as follows:
+
+ ./configure
+ make
+ sudo make install
+
+ But consult the Metaproxy documentation for requirements and
+ options.
+
+
+ We are now ready to build the MP-XQuery module with:
+
+ cd mp-xquery-version
+ make ZORBA=/opt/zorba MP_CONFIG=/usr/local/bin/mp-config
+
+ Adjust ZORBA and MP_CONFIG values
+ above for the correct location of installed
+ Zorba and Metaproxy's mp-config respectively. MP_CONFIG can be omitted
+ if Metaproxy was installed in the system PATH.
+
+
+ You can now install the metaproxy_filter_xquery.so
+ in a directory searched by Metaproxy daemon.
+ Specifically, that's the directories
+ given by the dlpath configuration.
+
+
+ If dlpath includes /usr/lib/metaproxy6/modules,
+ the module can be installed with:
+
+ cp src/metaproxy_filter_xquery.so /usr/lib/metaproxy6/modules
+
+
+
+
+ For RHEL/CentOS systems on 64-bit architectures, the correct paths is:
+ /usr/lib64/metaproxy6/modules.
+
+
+
+
+ BIBFRAME
+
+ The MARC to BIBFRAME was the primary purpose of the XQuery
+ module for Metaproxy, but generally the module is a just an alternative
+ to record_transform filter of Metaproxy which primarily performs XSLT.
+
+
+ The bibframe directory of the source tar
+ contains sample file for performing MARC to BIBFRAME conversions.
+ Upon make install these are installed to directory
+ /usr/share/mp-xquery/bibframe and they are also
+ part of the package mp-xquery.
+
+
+ config.xml is a complete Metaproxy configuration file.
+ It includes a standalone configuration that makes Metaproxy offe
+ Z39.50 and SRU support on port 9070. The modules in use are http_file
+ (to serve XSL files), sru_z3950 (SRU service), cql_rpn (CQL to RPN
+ conversion), xquery (to convert MARCXML to BIBFRAME), record_transform
+ (to convert MARC21 to MARCXML), virt_db (for database rewrite), log
+ (to perform backend logging) and, finally, z3950_client to interface
+ a Z39.50 target.
+
+
+ It is important that the XQuery module comes before the
+ "record_transform" so that the XQuery module sees XML
+ only and not ISO2709-records.
+ If it does, they will be ignored (passed through) by the XQuery module.
+
+
+ The XQuery module script name points to the full path of
+ zorba3-0.xqy part
+ of marc2bibframe . Do not move zorba3-0.xqy
+ from its place within the
+ marc2bibframe directory as other files are referred to and their relative
+ location must be preserved.
+
+
+ File cql2pqf.txt contains a simple DC/CQL profile
+ for driving a CQL to RPN conversion.
+ It is referred to from the cql_rpn filter in config.xml .
+
+
+ File explain.xml is SRU explain configuration.
+ It is referred to from the sru_z3950 filter in config.xml .
+
+
+ Directory xsl/.. is client side XSL for brief -
+ and full display. These must be located so that the http_file filter
+ can fetch them. For example, if these files are located in
+ /usr/share/mp-xquery/bibframe/xsl , then
+ http_file would hold
+
+
+ /usr/share/mp-xquery/bibframe/xsl
+
+ true
+
+
+]]>
+
+
+
+
+ Do not modify the files below /usr/share/mp-xquery.
+ They will be overwritten by a package update and if
+ make install is executed.
+ Use them if they can be used as-is but copy them away if you want to
+ modify them (such as config.xml).
+
+
+
-
Reference