<?xml version="1.0"?>
<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
  <start route="start"/>
  <filters>
    <filter id="frontend" type="frontend_net">
      <threads>10</threads>
      <port>@:9000</port>
    </filter>
    <filter id="sru" type="sru_z3950">
      <stylesheet>/etc/sru.xsl</stylesheet>
      <database name="Default">
        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../etc/explain.xml"/>
      </database>
      <database name="test">
        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../etc/explain.xml"/>
      </database>
      <limit retrieve="50"/>
    </filter>
    <filter id="cql" type="cql_rpn">
      <conversion file="../etc/cql2pqf.txt"/>
      <conversion key="rec.id">1=12 4=3</conversion>
    </filter>
    <filter id="retrieve" type="record_transform">
      <retrievalinfo xmlns="http://indexdata.com/yaz" version="1.0">
        <retrieval identifier="info:srw/schema/1/dc-v1.1" name="dc" syntax="xml">
          <backend name="F" syntax="usmarc">
            <marc inputcharset="marc-8" inputformat="marc" outputformat="marcxml"/>
            <xslt stylesheet="../xml/xslt/MARC21slim2DC.xsl"/>
          </backend>
        </retrieval>
        <retrieval syntax="opac"/>
        <retrieval name="opac" syntax="xml">
          <backend name="F" syntax="opac">
            <marc inputcharset="marc-8" inputformat="marc" outputformat="marcxml"/>
          </backend>
        </retrieval>
        <retrieval name="marcxml" syntax="xml">
          <backend name="F" syntax="usmarc">
            <marc inputcharset="marc-8" inputformat="marc" outputformat="marcxml"/>
          </backend>
        </retrieval>
        <retrieval syntax="usmarc">
          <backend name="F" syntax="usmarc">
          </backend>
        </retrieval>
      </retrievalinfo>
    </filter>
  </filters>
  <routes>
    <!-- Z39.50 clients -->
    <route id="remote">
      <filter type="log">
        <message>remote</message>
      </filter>
      <filter type="z3950_client">
        <timeout>30</timeout>
      </filter>
      <filter type="bounce"/>
    </route>
    <!-- shared Z39.50 clients -->
    <route id="shared">
      <filter type="log">
        <message>shared</message>
      </filter>
      <filter type="session_shared"/>
      <filter type="z3950_client">
        <timeout>30</timeout>
      </filter>
      <filter type="bounce"/>
    </route>
    <!-- local built-in server -->
    <route id="local">
      <filter type="backend_test"/>
      <filter type="bounce"/>
    </route>
    <route id="start">
      <filter refid="frontend"/>
      <filter type="log">
        <message>HTTP</message>
        <!-- <category apdu="true"/> -->
      </filter>
      <filter type="http_file">
        <area>
          <documentroot>.</documentroot>
          <prefix>/etc</prefix>
        </area>
      </filter>
      <filter refid="sru"/>
      <filter refid="cql"/>
      <filter refid="retrieve"/>
      <filter type="log">
        <message>Z3950</message>
      </filter>
      <filter type="virt_db">
        <virtual route="shared">
          <database>Default</database>
          <target>localhost:9999/Default</target>
        </virtual>
        <virtual route="local">
          <database>test</database>
          <target>someid</target>
        </virtual>
      </filter>
      <filter type="session_shared"/>
      <filter type="z3950_client">
        <timeout>30</timeout>
      </filter>
      <filter type="bounce"/>
    </route>
  </routes>
</metaproxy>
