Implement <file path="path"/>
[pazpar2-moved-to-github.git] / etc / dc.xsl
index 3f4454c..d9ae36d 100644 (file)
@@ -7,22 +7,18 @@
     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:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/">
 
  <xsl:output indent="yes"
         method="xml"
         version="1.0"
         encoding="UTF-8"/>
 
-  <xsl:template match="/metadata">
-    <pz:record>
+  <xsl:param name="medium" />
 
-      <xsl:attribute name="mergekey">
-        <xsl:text>title </xsl:text>
-       <xsl:value-of select="dc:title[1]"/>
-       <xsl:text> author </xsl:text>
-       <xsl:value-of select="dc:creator[1]"/>
-      </xsl:attribute>
+  <xsl:template match="/*">
+    <pz:record>
 
       <pz:metadata type="id">
         <xsl:value-of select="dc:identifier"/>
              </pz:metadata>
       </xsl:for-each>
 
+      <xsl:for-each select="dcterms:bibliographicCitation">
+        <pz:metadata type="citation">
+          <xsl:value-of select="."/>
+        </pz:metadata>
+      </xsl:for-each>
+
+      <pz:metadata type="medium">
+        <xsl:value-of select="$medium" />
+      </pz:metadata>
+
     </pz:record>
   </xsl:template>