Move mergekey definition to pazpar2.cfg
authorJakub Skoczen <jakub@indexdata.dk>
Thu, 10 Dec 2009 10:11:57 +0000 (11:11 +0100)
committerJakub Skoczen <jakub@indexdata.dk>
Thu, 10 Dec 2009 10:11:57 +0000 (11:11 +0100)
Moves mergekey definition away from the normalization stylesheets and
defines a mergekey common for all target types in pazpar2.cfg.

etc/cf.xsl
etc/dc.xsl
etc/marc21.xsl
etc/marc22.xsl
etc/pazpar2.cfg.dist
etc/unimarc.xsl

index 9c0fb74..9438c75 100644 (file)
 
   <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>
       <xsl:apply-templates/>
     </pz:record>
   </xsl:template>
index c8c3d0d..e2c4463 100644 (file)
   <xsl:template match="/*">
     <pz:record>
 
-      <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>
-
       <pz:metadata type="id">
         <xsl:value-of select="dc:identifier"/>
       </pz:metadata>
index 61cb641..8d8953a 100644 (file)
     </xsl:variable>
 
     <pz:record>
-      <xsl:attribute name="mergekey">
-        <xsl:text>title </xsl:text>
-       <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
-       <xsl:text> author </xsl:text>
-       <xsl:value-of select="marc:datafield[@tag='100']/marc:subfield[@code='a']"/>
-       <xsl:text> medium </xsl:text>
-       <xsl:value-of select="$medium"/>
-      </xsl:attribute>
-
       
       <xsl:for-each select="marc:controlfield[@tag='001']">
         <pz:metadata type="id">
index a655bd1..02e34e0 100644 (file)
     </xsl:variable>
 
     <pz:record>
-      <xsl:attribute name="mergekey">
-        <xsl:text>title </xsl:text>
-       <xsl:value-of select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
-       <xsl:text> author </xsl:text>
-       <xsl:value-of select="marc:datafield[@tag='100']/marc:subfield[@code='a']"/>
-       <xsl:text> medium </xsl:text>
-       <xsl:value-of select="$medium"/>
-      </xsl:attribute>
 
       <pz:metadata type="medium">
-       <xsl:value-of select="$medium"/>
+       <xsl:value-of select="$medium"/>
       </pz:metadata>
 
       <xsl:apply-templates/>
index f15a602..81bf883 100644 (file)
@@ -39,7 +39,8 @@
       <metadata name="isbn"/>
       <metadata name="issn"/>
       <metadata name="tech-rep-nr"/>
-      <metadata name="author" brief="yes" termlist="yes" merge="unique" rank="2"/>
+      <metadata name="author" brief="yes" termlist="yes" merge="unique" 
+        rank="2" mergekey="optional"/>
       <metadata name="author-title"/>
       <metadata name="author-date"/>
       <metadata name="corporate-name"/>
       <metadata name="date" brief="yes" sortkey="numeric" type="year"
                merge="range" termlist="yes"/>
       <metadata name="title" brief="yes" sortkey="skiparticle"
-               merge="longest" rank="6"/>
+               merge="longest" rank="6" mergekey="required"/>
       <metadata name="title-remainder" brief="yes" merge="longest" rank="5"/>
       <metadata name="title-responsibility" brief="yes" merge="longest"/>
       <metadata name="title-dates" brief="yes" merge="longest"/>
       <metadata name="title-medium" brief="yes" merge="longest"/>
       <metadata name="title-number-section" brief="yes" merge="longest"/>
-      <metadata name="medium" brief="yes" merge="no"/>
+      <metadata name="medium" brief="yes" merge="no" mergekey="optional"/>
       <metadata name="iii-id" brief="yes" merge="no"/>
       <metadata name="edition"/>
       <metadata name="publication-place"/>
index 4621f87..4842e24 100644 (file)
   <xsl:template match="/marc:record">
     <pz:record>
 
-      <xsl:attribute name="mergekey">
-        <xsl:text>title </xsl:text>
-       <xsl:value-of 
-            select="marc:datafield[@tag='200']/marc:subfield[@code='a']"/>
-       <xsl:text> author </xsl:text>
-       <xsl:value-of 
-            select="marc:datafield[@tag='700']/marc:subfield[@code='a']"/>
-        <xsl:text> </xsl:text>
-       <xsl:value-of 
-            select="marc:datafield[@tag='700']/marc:subfield[@code='b']"/>
-      </xsl:attribute>
-
-
       <xsl:for-each select="marc:controlfield[@tag='001']">
         <pz:metadata type="id">
           <xsl:value-of select="."/>