Added SRU holdings example config.
[metaproxy-moved-to-github.git] / etc / config-sru-holdings.xml
diff --git a/etc/config-sru-holdings.xml b/etc/config-sru-holdings.xml
new file mode 100644 (file)
index 0000000..1a17ce3
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<!-- $Id: config-sru-holdings.xml,v 1.1 2008-01-30 11:42:01 adam Exp $ -->
+
+<!-- This an example of an SRU enabled server which allows holdings to
+be fetched from Z39.50 OPAC records from a Z39.50 target. The virt_db
+is NOT used and, thus, the database does not map to a Z93.50 target.
+The Z39.50 is set, instead via the new x-target SRU parameter .
+-->
+<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">
+      <database name="Default"/>
+    </filter>
+    <filter id="retrieve" type="record_transform">
+      <retrievalinfo  xmlns="http://indexdata.com/yaz" version="1.0">
+       <!-- Offer Dublin core from MARC -->
+        <retrieval syntax="xml" name="dc"
+                   identifier="info:srw/schema/1/dc-v1.1">
+          <backend syntax="usmarc" name="F">
+            <marc inputformat="marc" outputformat="marcxml"
+                  inputcharset="marc-8"/>
+            <xslt stylesheet="../xml/xslt/MARC21slim2DC.xsl"/>
+          </backend>
+        </retrieval>
+        <!-- Native OPAC.. Z39.50 only -->
+        <retrieval syntax="opac"/>
+        <!-- OPAC XML.. For SRU (recordSchema=opac) and Z39.50-->
+        <retrieval syntax="xml" name="opac">
+          <backend syntax="opac" name="F">
+          <marc inputformat="marc" outputformat="marcxml"
+                inputcharset="marc-8"/>
+           <!-- XSLT transforms could be performed here -->
+          </backend>
+        </retrieval>
+      </retrievalinfo>
+    </filter>
+  </filters>
+  <routes>  
+    <route id="start">
+      <filter refid="frontend"/>
+      <filter type="log">
+        <message>HTTP</message>
+       <!-- <category apdu="true"/> -->
+      </filter>
+      <filter refid="sru"/>
+      <filter refid="retrieve"/>
+      <filter type="log">
+        <message>Z3950</message>
+      </filter>
+
+      <filter type="session_shared"/>
+      <filter type="z3950_client">
+       <timeout>30</timeout>
+      </filter>
+      <filter type="bounce"/>
+    </route>
+  </routes>
+</metaproxy>
+