Name

record_transform — Metaproxy Module that performs Z39.50 presentResponse record transformations

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 honor, and transforming the present syntax and elementset name according to the rules specified, to fetch only existing 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 additional identifier attribute can be added to explicitly 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 flavors: <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:

   <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>

   

SEE ALSO

metaproxy(1)

COPYRIGHT

Copyright (c) 2005-2008, Index Data ApS