doc-clean: removes manref.xml
[metaproxy-moved-to-github.git] / doc / record_transform.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
2     "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
3  <!ENTITY copyright SYSTEM "copyright.xml">
4  <!ENTITY % idcommon SYSTEM "common/common.ent">
5      %idcommon;
6 ]>
7 <refentry id="ref-record_transform">
8  <refmeta>
9   <refentrytitle>record_transform</refentrytitle>
10   <manvolnum>3mp</manvolnum>
11    <refmiscinfo>Metaproxy Module</refmiscinfo>
12 </refmeta>
13  
14  <refnamediv>
15   <refname>record_transform</refname>
16   <refpurpose>Metaproxy Module that performs Z39.50 presentResponse record transformations</refpurpose>
17  </refnamediv>
18
19  <refsect1><title>DESCRIPTION</title>
20   <para>
21    This filter acts only on Z3950 present requests, and let all
22    other types of packages and requests pass untouched. It's use is
23    twofold: blocking Z3950  present requests, which the backend
24    server does not understand and can not honor, and transforming
25    the present syntax and elementset name according to the rules
26    specified, to fetch only existing record formats, and transform
27    them on the fly to requested record syntaxes.
28   </para> 
29   <para>
30    The allowed record present syntax and 
31    element name are described in multiple
32    <literal>&lt;retrieval&gt;</literal> elements inside the 
33    <literal>&lt;retrievalinfo&gt;</literal>
34    element. The <literal>syntax</literal> attribute is mandatory, but
35    the <literal>name</literal> attribute
36    may be omitted, in which case any 
37    element name is accepted. An additional
38    <literal>identifier</literal> attribute can be added to explicitly
39    describe the Z3950 identifier string.
40   </para>
41   <para>
42   Record transformations are invoked when the optional attributes
43   <literal>backendsyntax</literal> and <literal>backendname</literal>
44   as well as the <literal>&lt;convert&gt;</literal> element are specified.  
45   Record conversions come in two flavors:
46   <literal>&lt;marc&gt;</literal> binary conversions between different
47   binary MARC formats and MarcXML formats, and
48   <literal>&lt;xslt&gt;</literal> stylesheet transformations performed
49   on any kind of XML records. These conversions can be stacked in any
50   order, and are performed linearly in file order. 
51   </para>
52   <para>
53    The binary MARC record transformations
54  <literal>&lt;marc&gt;</literal> are defined using the following
55    attributes: <literal>inputformat</literal>, <literal>outputformat</literal>,
56    <literal>inputcharset</literal> and  <literal>outputcharset</literal>.
57   </para>
58   <para>
59    XML <literal>&lt;xslt&gt;</literal> transformation instructions
60    accept only one mandatory <literal>stylesheet</literal> attribute,
61    which is either an absolute path, or a relative path from the
62    working directory of <literal>metaproxy</literal> to the location
63    of the requested XSLT stylesheet.
64   </para>
65  </refsect1>
66  
67  <refsect1><title>EXAMPLES</title>
68   <para>
69    A typical configuration looks like this:
70    <screen><![CDATA[
71    <filter type="record_transform">
72      <retrievalinfo>
73         <retrieval syntax="grs-1"/>
74         <retrieval syntax="usmarc" name="F"/>
75         <retrieval syntax="usmarc" name="B"/>
76         <retrieval syntax="xml" name="marcxml"
77                    identifier="info:srw/schema/1/marcxml-v1.1"
78                    backendsyntax="usmarc" backendname="F">
79           <convert>
80             <marc inputformat="marc" outputformat="marcxml"
81                   inputcharset="marc-8"/>
82           </convert>
83         </retrieval>
84         <retrieval syntax="xml" name="danmarc"
85                    backendsyntax="usmarc" backendname="F">
86           <convert>
87             <marc inputformat="marc" outputformat="marcxchange"
88                   inputcharset="marc-8"/>
89           </convert>
90         </retrieval>
91         <retrieval syntax="xml" name="dc"
92                    identifier="info:srw/schema/1/dc-v1.1"
93                    backendsyntax="usmarc" backendname="F">
94           <convert>
95             <marc inputformat="marc" outputformat="marcxml"
96                   inputcharset="marc-8"/>
97             <xslt stylesheet="xml/xslt/MARC21slim2DC.xsl"/>
98           </convert>
99         </retrieval>
100       </retrievalinfo>
101    </filter>
102 ]]>
103    </screen>
104   </para>
105  </refsect1> 
106  
107  <refsect1><title>SEE ALSO</title>
108   <para>
109    <citerefentry>
110     <refentrytitle>metaproxy</refentrytitle>
111     <manvolnum>1</manvolnum>
112    </citerefentry>
113   </para>
114  </refsect1>
115  
116  &copyright;
117 </refentry>
118
119 <!-- Keep this comment at the end of the file
120 Local variables:
121 mode: sgml
122 sgml-omittag:t
123 sgml-shorttag:t
124 sgml-minimize-attributes:nil
125 sgml-always-quote-attributes:t
126 sgml-indent-step:1
127 sgml-indent-data:t
128 sgml-parent-document:nil
129 sgml-local-catalogs: nil
130 sgml-namecase-general:t
131 End:
132 -->