Add XSLT sheet for Connector Frameworks records.
authorWolfram Schneider <wosch@indexdata.dk>
Tue, 10 Feb 2009 21:17:16 +0000 (21:17 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Tue, 10 Feb 2009 21:17:16 +0000 (21:17 +0000)
etc/cf.xsl [new file with mode: 0644]

diff --git a/etc/cf.xsl b/etc/cf.xsl
new file mode 100644 (file)
index 0000000..48ca651
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    This stylesheet expects Connector Frameworks records
+    $Id: usco.xsl,v 1.3 2009-01-13 15:18:42 wosch Exp $
+
+-->
+<xsl:stylesheet
+    version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:siebel="http://loc.gov/siebel/elements/1.0/" >
+
+ <xsl:output indent="yes"
+        method="xml"
+        version="1.0"
+        encoding="UTF-8"/>
+
+  <xsl:template match="/record">
+    <pz:record>
+
+      <xsl:attribute name="mergekey">
+       <xsl:text>title </xsl:text>
+        <xsl:value-of select="title" />
+       <xsl:text> author </xsl:text>
+        <xsl:value-of select="author"/>
+      </xsl:attribute>
+
+      <pz:metadata type="id">
+        <xsl:value-of select="url"/>
+      </pz:metadata>
+
+      <pz:metadata type="author">
+        <xsl:value-of select="author"/>
+      </pz:metadata>
+
+        <pz:metadata type="title">
+          <xsl:value-of select="title" />
+        </pz:metadata>
+
+        <pz:metadata type="date">
+          <xsl:value-of select="date" />
+        </pz:metadata>
+
+    </pz:record>
+  </xsl:template>
+
+  <xsl:template match="text()"/>
+
+</xsl:stylesheet>