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