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">
7 <refentry id="ref-sort">
9 <productname>Metaproxy</productname>
10 <info><orgname>Index Data</orgname></info>
14 <refentrytitle>sort</refentrytitle>
15 <manvolnum>3mp</manvolnum>
16 <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
20 <refname>sort</refname>
21 <refpurpose>Metaproxy Z39.50 Sort Module</refpurpose>
24 <refsect1><title>DESCRIPTION</title>
26 This filter performs sorting of Z39.50 result sets.
27 The sorting criteria is selected via an X-Path expression. Only
28 XML records are supported. The sorting is done only for the first
29 present request following a search. The number of records to prefetch
30 can is configurable. For example, if a client asks initially for 10
31 records this module may extend that and fetch more records and only
32 return the results in the 10 record window - after sorting.
35 The configuration is given as attribute inside element
36 <literal>sort</literal>. This element must occur exactly once. Future
37 versions of the sort module may include multiple sort elements.
38 The attributes within sort are:
40 <varlistentry><term>xpath</term>
43 Specifies the X-Path expression that picks the sorting data from
48 <varlistentry><term>namespaces</term>
51 Allows one or more namespaces to be declared with a user-defined
52 prefix. Each prefix may be referred to within the xpath expression.
56 <varlistentry><term>prefetch</term>
59 Number of records to prefetch.
63 <varlistentry><term>ascending</term>
66 Is a boolean value (false, true). If true, the sort module will
67 sort ascending. If false, the sort module will sort descending.
68 If omitted, the sort order will be ascending.
76 <refsect1><title>SCHEMA</title>
77 <literallayout><xi:include
78 xi:href="../xml/schema/filter_sort.rnc"
80 xmlns:xi="http://www.w3.org/2001/XInclude" />
84 <refsect1><title>EXAMPLES</title>
86 For example, to sort MARCXML records on title, one could use:
90 xpath="/marc:record/marc:datafield[@tag='245']/marc:subfield[@code='a']"
91 namespaces="marc=http://www.loc.gov/MARC21/slim"
102 <refsect1><title>SEE ALSO</title>
105 <refentrytitle>metaproxy</refentrytitle>
106 <manvolnum>1</manvolnum>
111 <refentrytitle>record_transform</refentrytitle>
112 <manvolnum>3mp</manvolnum>
120 <!-- Keep this comment at the end of the file