c490d56d1d1b322161e2a9b504c931c10834b095
[metaproxy-moved-to-github.git] / doc / record_transform.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
2     "http://www.oasis-open.org/docbook/xml/4.4/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  <refentryinfo>
9   <productname>Metaproxy</productname>
10   <info><orgname>Index Data</orgname></info>
11  </refentryinfo>
12
13  <refmeta>
14   <refentrytitle>record_transform</refentrytitle>
15   <manvolnum>3mp</manvolnum>
16   <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
17  </refmeta>
18
19  <refnamediv>
20   <refname>record_transform</refname>
21   <refpurpose>Metaproxy Module that performs record transformations</refpurpose>
22  </refnamediv>
23
24  <refsect1><title>DESCRIPTION</title>
25   <para>
26    This filter acts on Z39.50 present requests and Z39.50 search requests,
27    and let all other types of packages and requests pass untouched. Its
28    use is twofold: blocking Z39.50 present/search requests that the backend
29    server does not understand or can not honor, and transforming the present
30    syntax and elementset name according to the rules specified, to fetch
31    only existing record formats, and transform them on the fly to requested
32    record syntaxes.
33   </para>
34   <para>
35    The allowed record present syntax and
36    element name are described in multiple
37    <literal>&lt;retrieval&gt;</literal> elements inside the
38    <literal>&lt;retrievalinfo&gt;</literal>
39    element. The <literal>syntax</literal> attribute is mandatory, but
40    the <literal>name</literal> attribute
41    may be omitted, in which case any
42    element name is accepted. An additional
43    <literal>identifier</literal> attribute can be added to explicitly
44    describe the Z39.50 identifier string.
45   </para>
46   <para>
47     The <literal>&lt;retrieval&gt;</literal> element and the content
48     is described in the
49     <ulink url="&url.yaz.retrieval;">Retrieval Facility</ulink> section
50     of the YAZ manual.
51   </para>
52   <para>
53    From Metaproxy version 1.3.26 and onwards the backend conversion ma
54    also use <ulink url="&url.usemarcon;">USEMARCON</ulink>.
55    If USEMARCON is enabled, the <literal>backend</literal> may include
56    a <literal>usemarcon</literal> element with two attributes:
57    <literal>stage1</literal> and <literal>stage2</literal> that points to
58    conversion files as interpreted by USEMARCON. One or both must be given.
59   </para>
60  </refsect1>
61
62  <refsect1><title>SCHEMA</title>
63  <para>
64   Schema is in two parts.. One for the filter itself and one for the
65   retrieval info.
66  </para>
67  <literallayout>
68   <xi:include
69       xi:href="../xml/schema/filter_record_transform.rnc"
70       xi:parse="text"
71       xmlns:xi="http://www.w3.org/2001/XInclude" />
72  </literallayout>
73  <literallayout>
74   <xi:include
75       xi:href="../xml/schema/retrievalinfo.rnc"
76       xi:parse="text"
77       xmlns:xi="http://www.w3.org/2001/XInclude" />
78  </literallayout>
79  </refsect1>
80
81  <refsect1><title>EXAMPLES</title>
82   <para>
83    A typical configuration looks like this:
84    <screen><![CDATA[
85     <filter type="record_transform">
86       <retrievalinfo  xmlns="http://indexdata.com/yaz" version="1.0">
87         <retrieval syntax="xml" name="dc"
88                    identifier="info:srw/schema/1/dc-v1.1">
89           <backend syntax="usmarc" name="F">
90             <marc inputformat="marc" outputformat="marcxml"
91                   inputcharset="marc-8"/>
92             <xslt stylesheet="../xml/xslt/MARC21slim2DC.xsl"/>
93           </backend>
94         </retrieval>
95         <retrieval syntax="opac"/>
96         <retrieval syntax="xml" name="opac">
97           <backend syntax="opac" name="F">
98           <marc inputformat="marc" outputformat="marcxml"
99                 inputcharset="marc-8"/>
100           </backend>
101         </retrieval>
102         <retrieval syntax="usmarc">
103           <backend syntax="usmarc" name="F">
104           </backend>
105         </retrieval>
106         <retrieval syntax="usmarc" name="C">
107           <backend syntax="unimarc" name="F">
108             <usemarcon stage1="/etc/usemarcon/uni2us/uni2us.ini"/>
109           </backend>
110         </retrieval>
111       </retrievalinfo>
112     </filter>
113 ]]>
114    </screen>
115   </para>
116  </refsect1>
117
118  <refsect1><title>SEE ALSO</title>
119   <para>
120    <citerefentry>
121     <refentrytitle>metaproxy</refentrytitle>
122     <manvolnum>1</manvolnum>
123    </citerefentry>
124   </para>
125  </refsect1>
126
127  &copyright;
128 </refentry>
129
130 <!-- Keep this comment at the end of the file
131 Local variables:
132 mode: nxml
133 nxml-child-indent: 1
134 End:
135 -->