From e2f76f7d5f800b51b2a153f83433d9654e384ba3 Mon Sep 17 00:00:00 2001 From: Marc Cromme Date: Thu, 12 Oct 2006 08:27:35 +0000 Subject: [PATCH] added documentaton for filter_record_transform --- doc/Makefile.am | 8 +-- doc/book.xml | 64 +++++++++++++++------- doc/record_transform.xml | 131 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+), 22 deletions(-) create mode 100644 doc/record_transform.xml diff --git a/doc/Makefile.am b/doc/Makefile.am index c94b058..fb7e7ce 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,9 +1,9 @@ -## $Id: Makefile.am,v 1.29 2006-10-11 13:21:51 marc Exp $ -docdir=$(datadir)/doc/@PACKAGE@ +## $Id: Makefile.am,v 1.30 2006-10-12 08:27:35 marc Exp $ +#docdir=$(datadir)/doc/@PACKAGE@ SUBDIRS = common -SUFFIXES=.3mp .1 +SUFFIXES=.3mp .1 .pdf .tkl .esp .xml XMLFILES = book.xml manref.xml copyright.xml @@ -13,11 +13,13 @@ XMLMAN = metaproxy.xml \ auth_simple.xml backend_test.xml bounce.xml \ frontend_net.xml \ http_file.xml log.xml multi.xml query_rewrite.xml \ + record_transform.xml\ session_shared.xml template.xml virt_db.xml z3950_client.xml MANFILES = auth_simple.3mp backend_test.3mp bounce.3mp \ frontend_net.3mp \ http_file.3mp log.3mp multi.3mp query_rewrite.3mp \ + record_transform.3mp\ session_shared.3mp template.3mp virt_db.3mp z3950_client.3mp \ metaproxy.1 diff --git a/doc/book.xml b/doc/book.xml index ce1b5b6..099a0ba 100644 --- a/doc/book.xml +++ b/doc/book.xml @@ -17,7 +17,7 @@ --> ]> - + Metaproxy - User's Guide and Reference @@ -637,6 +637,7 @@ log, multi, query_rewrite, + record_transform, session_shared, template, virt_db). @@ -799,6 +800,21 @@ Figure out what additional information we need in: + +
+ <literal>record_transform</literal> + (mp::filter::RecordTransform) + + This filter acts only on Z3950 present requests, and let all + other types of packages and requests pass untouched. It's use is + twofold: blocking Z3950 present requests, which the backend + server does not understand and can not honour, and transforming + the present syntax and elementset name according to the rules + specified, to fetch only exisitng record formats, and transform + them on the fly to requested record syntaxes. + +
+
<literal>session_shared</literal> (mp::filter::SessionShared) @@ -832,7 +848,7 @@ Figure out what additional information we need in:
<literal>virt_db</literal> - (mp::filter::Virt_db) + (mp::filter::VirtualDB) Performs virtual database selection: based on the name of the database in the search request, a server is selected, and its @@ -948,26 +964,10 @@ Figure out what additional information we need in: implementation detail - they could just as well have been written in YAML or Lisp-like S-expressions, or in a custom syntax.) - - Since XML has been chosen, an XML schema, - config.xsd, is provided for validating - configuration files. This file is supplied in the - etc directory of the Metaproxy distribution. It - can be used by (among other tools) the xmllint - program supplied as part of the libxml2 - distribution: - - - xmllint --noout --schema etc/config.xsd my-config-file.xml - - - (A recent version of libxml2 is required, as - support for XML Schemas is a relatively recent addition.) -
- Overview of XML structure + Overview of the config file XML structure All elements and attributes are in the namespace . @@ -1082,6 +1082,32 @@ Figure out what additional information we need in: which returns the response to the client.
+
+ Config file syntax checking + + The distribution contains RelaxNG Compact and XML syntax checking + files, as well as XML Schema files. These are found in the + distribution pathes + + xml/schema/metaproxy.rnc + xml/schema/metaproxy.rng + xml/schema/metaproxy.xsd + + and can be used to verify or debug the XML structure of + configuration files. For example, using the utility + xmllint, syntax checking is done like this: + + xmllint --noout --schema xml/schema/metaproxy.xsd etc/config-local.xml + xmllint --noout --relaxng xml/schema/metaproxy.rng etc/config-local.xml + + (A recent version of libxml2 is required, as + support for XML Schemas is a relatively recent addition.) + + + You can of course use any other RelaxNG or XML Schema compliant tool + you wish. + +
diff --git a/doc/record_transform.xml b/doc/record_transform.xml new file mode 100644 index 0000000..5ec12a0 --- /dev/null +++ b/doc/record_transform.xml @@ -0,0 +1,131 @@ + +]> + + + + record_transform + 3mp + Metaproxy Module + + + + record_transform + Z3950 present package record transformation + + + DESCRIPTION + + This filter acts only on Z3950 present requests, and let all + other types of packages and requests pass untouched. It's use is + twofold: blocking Z3950 present requests, which the backend + server does not understand and can not honour, and transforming + the present syntax and elementset name according to the rules + specified, to fetch only exisitng record formats, and transform + them on the fly to requested record syntaxes. + + + The allowed record present syntax and + element name are described in multiple + <retrieval> elements inside the + <retrievalinfo> + element. The syntax attribute is mandatory, but + the name attribute + may be omitted, in which case any + element name is accepted. An additonal + identifier attribute can be added to explicetly + describe the Z3950 identifier string. + + + Record transformations are invoked when the optional attributes + backendsyntax and backendname + as well as the <convert> element are specified. + Record conversions come in two flavours: + <marc> binary conversions between different + binary MARC formats and MarcXML formats, and + <xslt> stylesheet transformations performed + on any kind of XML records. These conversions can be stacked in any + order, and are performed linearly in file order. + + + The binary MARC record transformations + <marc> are defined using the following + attributes: inputformat, outputformat, + inputcharset and outputcharset. + + + XML <xslt> transformation instructions + accept only one mandatory stylesheet attribute, + which is either an absolute path, or a relative path from the + working directory of metaproxy to the location + of the requested XSLT stylesheet. + + + + EXAMPLES + + A typical configuration looks like this: + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + SEE ALSO + + + metaproxy + 1 + + + + + ©right; + + + -- 1.7.10.4