15c5a9f41aca890fe6d224dd804644f0c6b8cbfe
[metaproxy-moved-to-github.git] / doc / query_rewrite.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-query_rewrite">
8  <refentryinfo>
9   <productname>Metaproxy</productname>
10   <info><orgname>Index Data</orgname></info>
11  </refentryinfo>
12
13  <refmeta>
14   <refentrytitle>query_rewrite</refentrytitle>
15   <manvolnum>3mp</manvolnum>
16   <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
17  </refmeta>
18
19  <refnamediv>
20   <refname>query_rewrite</refname>
21   <refpurpose>Metaproxy RPN Query Rewrite Module</refpurpose>
22  </refnamediv>
23
24  <refsect1><title>DESCRIPTION</title>
25   <para>
26    This module allows Z39.50 Type-1 queries to be arbitrarily
27    rewritten using an XSLT stylesheet to specify the rewrite rules.
28    This can be useful for several purposes, including the provision of
29    index aliases (e.g. BIB-1 access-point 1, personal name, rewritten
30    to access-point 1003, author); and protecting fragile Z39.50 server
31    from attribute combinations that cause them problems.
32   </para>
33   <para>
34    The Type-1 query is translated into an XML representation,
35    transformed by an XSLT stylesheet whose path is specified in the
36    filter configuration's <literal>&lt;xslt&gt;</literal> element,
37    then translated back into a Type-1 query.
38   </para>
39   <para>
40    ### Describe the XML representation.
41   </para>
42  </refsect1>
43
44  <refsect1><title>SCHEMA</title>
45    <literallayout><xi:include
46                      xi:href="../xml/schema/filter_query_rewrite.rnc"
47                      xi:parse="text"
48                      xmlns:xi="http://www.w3.org/2001/XInclude" />
49    </literallayout>
50  </refsect1>
51
52  <refsect1><title>EXAMPLES</title>
53   <para>
54    A typical configuration looks like this:
55    <screen><![CDATA[
56    <filter type="query_rewrite">
57     <xslt stylesheet="pqf2pqf.xsl">
58    </filter>
59 ]]>
60    </screen>
61   </para>
62  </refsect1>
63
64  <refsect1><title>SEE ALSO</title>
65   <para>
66    <citerefentry>
67     <refentrytitle>metaproxy</refentrytitle>
68     <manvolnum>1</manvolnum>
69    </citerefentry>
70   </para>
71  </refsect1>
72
73  &copyright;
74 </refentry>
75
76 <!-- Keep this comment at the end of the file
77 Local variables:
78 mode: nxml
79 nxml-child-indent: 1
80 End:
81 -->