New -- currently a copy of zeerex2dc.xmk, but that will change!
authorMike Taylor <mike@indexdata.com>
Fri, 11 May 2007 08:29:24 +0000 (08:29 +0000)
committerMike Taylor <mike@indexdata.com>
Fri, 11 May 2007 08:29:24 +0000 (08:29 +0000)
zebra/zeerex2noauth.xsl [new file with mode: 0644]

diff --git a/zebra/zeerex2noauth.xsl b/zebra/zeerex2noauth.xsl
new file mode 100644 (file)
index 0000000..6b16a92
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: zeerex2noauth.xsl,v 1.1 2007-05-11 08:29:24 mike Exp $ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:z="http://indexdata.dk/zebra/xslt/1"
+                xmlns:e="http://explain.z3950.org/dtd/2.0/"
+                version="1.0">
+
+ <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+ <!-- Disable all default text node output -->
+ <xsl:template match="text()"/>
+ <!-- Match on ZeeRex XML record -->
+
+ <xsl:template match="//e:explain">
+  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
+       z:id="{concat(e:serverInfo/@protocol, ':',
+                     e:serverInfo/e:host, ':',
+                     e:serverInfo/e:port, '/',
+                     e:serverInfo/e:database)}">
+   <dc:title>
+    <xsl:value-of select="e:databaseInfo/e:title"/>
+   </dc:title>
+   <dc:creator>
+    <xsl:value-of select="e:databaseInfo/e:author"/>
+   </dc:creator>
+   <!-- Subject -->
+   <dc:description>
+    <xsl:value-of select="e:databaseInfo/e:description"/>
+   </dc:description>
+   <!-- Publisher -->
+   <!-- Contributor -->
+   <dc:date>
+    <xsl:value-of select="e:serverInfo/e:database/@lastUpdate"/>
+   </dc:date>
+   <dc:type>Service</dc:type>
+   <!-- Format -->
+   <dc:identifier>
+    <xsl:value-of select="concat(
+                         e:serverInfo/e:host, ':',
+                         e:serverInfo/e:port, '/',
+                         e:serverInfo/e:database)"/>
+   </dc:identifier>
+   <!-- Source -->
+   <dc:language>
+    <xsl:value-of select="e:databaseInfo/e:langUsage"/>
+   </dc:language>
+   <!-- Relation -->
+   <!-- Coverage -->
+   <!-- Rights -->
+  </metadata>
+ </xsl:template>
+</xsl:stylesheet>