-## $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
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
-->
<!NOTATION PDF SYSTEM "PDF">
]>
-<!-- $Id: book.xml,v 1.38 2006-09-08 14:12:28 marc Exp $ -->
+<!-- $Id: book.xml,v 1.39 2006-10-12 08:27:35 marc Exp $ -->
<book id="metaproxy">
<bookinfo>
<title>Metaproxy - User's Guide and Reference</title>
<literal>log</literal>,
<literal>multi</literal>,
<literal>query_rewrite</literal>,
+ <literal>record_transform</literal>,
<literal>session_shared</literal>,
<literal>template</literal>,
<literal>virt_db</literal>).
</para>
</section>
+
+ <section>
+ <title><literal>record_transform</literal>
+ (mp::filter::RecordTransform)</title>
+ <para>
+ 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.
+ </para>
+ </section>
+
<section>
<title><literal>session_shared</literal>
(mp::filter::SessionShared)</title>
<section>
<title><literal>virt_db</literal>
- (mp::filter::Virt_db)</title>
+ (mp::filter::VirtualDB)</title>
<para>
Performs virtual database selection: based on the name of the
database in the search request, a server is selected, and its
implementation detail - they could just as well have been written
in YAML or Lisp-like S-expressions, or in a custom syntax.)
</para>
- <para>
- Since XML has been chosen, an XML schema,
- <filename>config.xsd</filename>, is provided for validating
- configuration files. This file is supplied in the
- <filename>etc</filename> directory of the Metaproxy distribution. It
- can be used by (among other tools) the <command>xmllint</command>
- program supplied as part of the <literal>libxml2</literal>
- distribution:
- </para>
- <screen>
- xmllint --noout --schema etc/config.xsd my-config-file.xml
- </screen>
- <para>
- (A recent version of <literal>libxml2</literal> is required, as
- support for XML Schemas is a relatively recent addition.)
- </para>
</section>
<section id="overview.xml.structure">
- <title>Overview of XML structure</title>
+ <title>Overview of the config file XML structure</title>
<para>
All elements and attributes are in the namespace
<ulink url="http://indexdata.dk/yp2/config/1"/>.
which returns the response to the client.
</para>
</section>
+ <section id="checking.xml.syntax">
+ <title>Config file syntax checking</title>
+ <para>
+ The distribution contains RelaxNG Compact and XML syntax checking
+ files, as well as XML Schema files. These are found in the
+ distribution pathes
+ <screen>
+ xml/schema/metaproxy.rnc
+ xml/schema/metaproxy.rng
+ xml/schema/metaproxy.xsd
+ </screen>
+ and can be used to verify or debug the XML structure of
+ configuration files. For example, using the utility
+ <filename>xmllint</filename>, syntax checking is done like this:
+ <screen>
+ xmllint --noout --schema xml/schema/metaproxy.xsd etc/config-local.xml
+ xmllint --noout --relaxng xml/schema/metaproxy.rng etc/config-local.xml
+ </screen>
+ (A recent version of <literal>libxml2</literal> is required, as
+ support for XML Schemas is a relatively recent addition.)
+ </para>
+ <para>
+ You can of course use any other RelaxNG or XML Schema compliant tool
+ you wish.
+ </para>
+ </section>
</chapter>
--- /dev/null
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+ <!ENTITY copyright SYSTEM "copyright.xml">
+]>
+<!-- $Id: record_transform.xml,v 1.1 2006-10-12 08:27:35 marc Exp $ -->
+<refentry>
+ <refmeta>
+ <refentrytitle>record_transform</refentrytitle>
+ <manvolnum>3mp</manvolnum>
+ <refmiscinfo>Metaproxy Module</refmiscinfo>
+</refmeta>
+
+ <refnamediv>
+ <refname>record_transform</refname>
+ <refpurpose>Z3950 present package record transformation</refpurpose>
+ </refnamediv>
+
+ <refsect1><title>DESCRIPTION</title>
+ <para>
+ 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.
+ </para>
+ <para>
+ The allowed record present syntax and
+ element name are described in multiple
+ <literal><retrieval></literal> elements inside the
+ <literal><retrievalinfo></literal>
+ element. The <literal>syntax</literal> attribute is mandatory, but
+ the <literal>name</literal> attribute
+ may be omitted, in which case any
+ element name is accepted. An additonal
+ <literal>identifier</literal> attribute can be added to explicetly
+ describe the Z3950 identifier string.
+ </para>
+ <para>
+ Record transformations are invoked when the optional attributes
+ <literal>backendsyntax</literal> and <literal>backendname</literal>
+ as well as the <literal><convert></literal> element are specified.
+ Record conversions come in two flavours:
+ <literal><marc></literal> binary conversions between different
+ binary MARC formats and MarcXML formats, and
+ <literal><xslt></literal> stylesheet transformations performed
+ on any kind of XML records. These conversions can be stacked in any
+ order, and are performed linearly in file order.
+ </para>
+ <para>
+ The binary MARC record transformations
+ <literal><marc></literal> are defined using the following
+ attributes: <literal>inputformat</literal>, <literal>outputformat</literal>,
+ <literal>inputcharset</literal> and <literal>outputcharset</literal>.
+ </para>
+ <para>
+ XML <literal><xslt></literal> transformation instructions
+ accept only one mandatory <literal>stylesheet</literal> attribute,
+ which is either an absolute path, or a relative path from the
+ working directory of <literal>metaproxy</literal> to the location
+ of the requested XSLT stylesheet.
+ </para>
+ </refsect1>
+
+ <refsect1><title>EXAMPLES</title>
+ <para>
+ A typical configuration looks like this:
+ <screen><![CDATA[
+ <filter type="record_transform">
+ <retrievalinfo>
+ <retrieval syntax="grs-1"/>
+ <retrieval syntax="usmarc" name="F"/>
+ <retrieval syntax="usmarc" name="B"/>
+ <retrieval syntax="xml" name="marcxml"
+ identifier="info:srw/schema/1/marcxml-v1.1"
+ backendsyntax="usmarc" backendname="F">
+ <convert>
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="marc-8"/>
+ </convert>
+ </retrieval>
+ <retrieval syntax="xml" name="danmarc"
+ backendsyntax="usmarc" backendname="F">
+ <convert>
+ <marc inputformat="marc" outputformat="marcxchange"
+ inputcharset="marc-8"/>
+ </convert>
+ </retrieval>
+ <retrieval syntax="xml" name="dc"
+ identifier="info:srw/schema/1/dc-v1.1"
+ backendsyntax="usmarc" backendname="F">
+ <convert>
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="marc-8"/>
+ <xslt stylesheet="xml/xslt/MARC21slim2DC.xsl"/>
+ </convert>
+ </retrieval>
+ </retrievalinfo>
+ </filter>
+]]>
+ </screen>
+ </para>
+ </refsect1>
+
+ <refsect1><title>SEE ALSO</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>metaproxy</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>
+ </para>
+ </refsect1>
+
+ ©right;
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-local-catalogs: nil
+sgml-namecase-general:t
+End:
+-->