sort — Metaproxy Z39.50 Sort Module
This filter performs sorting of Z39.50 result sets. The sorting criteria is selected via an X-Path expression. Only XML records are supported. The sorting is done only for the first present request following a search. The number of records to prefetch is configurable. For example, if a client asks initially for 10 records this module may extend that, and fetch more records and only return the results in the 10 record window - after sorting.
The configuration is given as attribute inside element
sort
. This element must occur exactly once. Future
versions of the sort module may include multiple sort elements.
The attributes within sort are:
Specifies the X-Path expression that picks the sorting data from the record.
Allows one or more namespaces to be declared with a user-defined prefix. Each prefix may be referred to within the xpath expression.
Number of records to prefetch.
Is a boolean value (false, true). If true, the sort module will sort ascending. If false, the sort module will sort descending. If omitted, the sort order will be ascending.
# Metaproxy XML config file schemas
#
# Copyright (C) Index Data
# See the LICENSE file for details.
namespace mp = "http://indexdata.com/metaproxy"
filter_sort =
attribute type { "sort" },
attribute id { xsd:NCName }?,
attribute name { xsd:NCName }?,
element mp:sort {
attribute prefetch { xsd:integer }?,
attribute xpath { xsd:string },
attribute namespaces { xsd:string }?,
attribute ascending { xsd:boolean }?,
attribute debug { xsd:boolean }?
}