Name

query_rewrite — Metaproxy RPN Query Rewrite Module

DESCRIPTION

This module allows Z39.50 Type-1 queries to be arbitrarily rewritten using an XSLT stylesheet to specify the rewrite rules. This can be useful for several purposes, including the provision of index aliases (e.g. BIB-1 access-point 1, personal name, rewritten to access-point 1003, author); and protecting fragile Z39.50 servers from attribute combinations that cause them problems.

The Type-1 query is translated into an XML representation, transformed by an XSLT stylesheet whose path is specified in the filter configuration's <xslt> element, then translated back into a Type-1 query.

### Describe the XML representation.

SCHEMA

# Metaproxy XML config file schemas
#
#   Copyright (C) Index Data
#   See the LICENSE file for details.

namespace mp = "http://indexdata.com/metaproxy"

filter_query_rewrite =
  attribute type { "query_rewrite" },
  attribute id { xsd:NCName }?,
  attribute name { xsd:NCName }?,
  element mp:xslt { 
        attribute stylesheet { xsd:string }
  }?,
  element mp:charset { 
        attribute from { xsd:string }?,
        attribute to { xsd:string }?
  }?

   

EXAMPLES

A typical configuration looks like this:

   <filter type="query_rewrite">
    <xslt stylesheet="pqf2pqf.xsl">
   </filter>

   

SEE ALSO

metaproxy(1)

COPYRIGHT

Copyright (C) 2005-2023 Index Data