Use multiple meta-data elements.
authorJakub Skoczen <jakub@indexdata.dk>
Tue, 3 Mar 2009 14:35:48 +0000 (15:35 +0100)
committerJakub Skoczen <jakub@indexdata.dk>
Tue, 3 Mar 2009 14:35:48 +0000 (15:35 +0100)
etc/cf.xsl

index 48ca651..45ccad8 100644 (file)
 
   <xsl:template match="/record">
     <pz:record>
-
       <xsl:attribute name="mergekey">
-       <xsl:text>title </xsl:text>
+             <xsl:text>title </xsl:text>
         <xsl:value-of select="title" />
-       <xsl:text> author </xsl:text>
+             <xsl:text> author </xsl:text>
         <xsl:value-of select="author"/>
       </xsl:attribute>
+      <xsl:apply-templates/>
+    </pz:record>
+  </xsl:template>
 
-      <pz:metadata type="id">
-        <xsl:value-of select="url"/>
-      </pz:metadata>
+  <xsl:template match="url">
+    <pz:metadata type="electronic-url">
+      <xsl:value-of select="."/>
+    </pz:metadata>
+  </xsl:template>
 
-      <pz:metadata type="author">
-        <xsl:value-of select="author"/>
-      </pz:metadata>
+  <xsl:template match="author">
+    <pz:metadata type="author">
+      <xsl:value-of select="."/>
+    </pz:metadata>
+  </xsl:template>
 
-        <pz:metadata type="title">
-          <xsl:value-of select="title" />
-        </pz:metadata>
+  <xsl:template match="title">
+    <pz:metadata type="title">
+      <xsl:value-of select="."/>
+    </pz:metadata>
+  </xsl:template>
 
-        <pz:metadata type="date">
-          <xsl:value-of select="date" />
-        </pz:metadata>
+  <xsl:template match="date">
+    <pz:metadata type="publication-date">
+      <xsl:value-of select="."/>
+    </pz:metadata>
+  </xsl:template>
 
-    </pz:record>
+  <xsl:template match="description">
+    <pz:metadata type="description">
+      <xsl:value-of select="."/>
+    </pz:metadata>
   </xsl:template>
 
   <xsl:template match="text()"/>