New
authorMike Taylor <mike@indexdata.com>
Tue, 26 Sep 2006 14:37:41 +0000 (14:37 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 26 Sep 2006 14:37:41 +0000 (14:37 +0000)
zebra/zeerex2dc.xsl [new file with mode: 0644]

diff --git a/zebra/zeerex2dc.xsl b/zebra/zeerex2dc.xsl
new file mode 100644 (file)
index 0000000..bcdaecc
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: zeerex2dc.xsl,v 1.1 2006-09-26 14:37:41 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/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>