New
authorMike Taylor <mike@miketaylor.org.uk>
Fri, 9 Apr 2010 09:58:47 +0000 (10:58 +0100)
committerMike Taylor <mike@miketaylor.org.uk>
Fri, 9 Apr 2010 09:58:47 +0000 (10:58 +0100)
zebra/dom-filter/README [new file with mode: 0644]
zebra/dom-filter/domfilterconf.xml [new file with mode: 0644]
zebra/dom-filter/zebra.cfg [new file with mode: 0644]
zebra/dom-filter/zeerex2index.xsl [new file with mode: 0644]

diff --git a/zebra/dom-filter/README b/zebra/dom-filter/README
new file mode 100644 (file)
index 0000000..72a916f
--- /dev/null
@@ -0,0 +1,3 @@
+These files are the residue of an abandoned port of IRSpy's Zebra
+configuration from the Alvis filter to the DOM filter.  We will
+probably return to this at some point.
diff --git a/zebra/dom-filter/domfilterconf.xml b/zebra/dom-filter/domfilterconf.xml
new file mode 100644 (file)
index 0000000..456da1f
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dom xmlns="http://indexdata.com/zebra-2.0">
+  <input>
+    <xmlreader level="0"/>
+  </input>
+  <extract>
+    <xslt stylesheet="zeerex2index.xsl"/>
+  </extract>
+  <retrieve name="zeerex">
+  </retrieve>
+  <retrieve name="zeerexNoAuth">
+    <xslt stylesheet="zeerex2noauth.xsl"/>
+  </retrieve>
+  <retrieve name="id">
+    <xslt stylesheet="zeerex2id.xsl"/>
+  </retrieve>
+  <retrieve name="dc">
+    <xslt stylesheet="zeerex2dc.xsl"/>
+  </retrieve>
+</dom>
diff --git a/zebra/dom-filter/zebra.cfg b/zebra/dom-filter/zebra.cfg
new file mode 100644 (file)
index 0000000..76c3946
--- /dev/null
@@ -0,0 +1,31 @@
+# $Id: zebra.cfg,v 1.12 2006-12-19 12:53:16 sondberg Exp $
+
+# Where to look for config files
+profilePath: .:/usr/local/share/idzebra-2.0/tab:/usr/share/idzebra-2.0/tab
+
+# Where to look for loadable zebra modules.  Both these path components
+# are necessary, since the former is used when installing from a Debian
+# package and the latter when installing from a CVS build.
+modulePath: /usr/lib/idzebra-2.0/modules
+#modulePath: /usr/local/lib/idzebra-2.0/modules
+
+# store records and record keys internally
+storeData: 1
+storeKeys: 1
+
+# Use the "dom" filter with config file "domfilterconf.xml"
+recordtype.xml: dom.domfilterconf.xml
+
+database: IR-Explain---1
+#database: Default
+
+# where to put registers, and other var content, and how large they may be
+register: db/register:100G
+shadow: db/shadow:100G
+lockdir: db/lock
+keytmpdir: db/tmp
+
+# Permissions for update
+perm.anonymous: ra
+perm.admin: rw
+passwd.c: htpasswd
diff --git a/zebra/dom-filter/zeerex2index.xsl b/zebra/dom-filter/zeerex2index.xsl
new file mode 100644 (file)
index 0000000..527407a
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:z="http://indexdata.com/zebra-2.0"
+                xmlns:e="http://explain.z3950.org/dtd/2.0/"
+                xmlns:i="http://indexdata.com/irspy/1.0"
+                version="1.0">
+ <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+ <xsl:template match="text()"/>
+ <xsl:template match="//e:explain">
+  <xsl:variable name="id"><xsl:value-of select="concat(
+       e:serverInfo/@protocol, ':',
+       e:serverInfo/e:host, ':',
+       e:serverInfo/e:port, '/',
+       e:serverInfo/e:database)"/></xsl:variable>
+  <z:record z:id="{$id}" type="update">
+   <z:index name="dc:title:w">
+    <xsl:value-of select="e:databaseInfo/e:title"/>
+   </z:index>
+  </z:record>
+ </xsl:template>
+</xsl:stylesheet>