Fixed: record -> r. Removed FRBR stuff
authorDennis Schafroth <dennis@indexdata.com>
Fri, 12 Mar 2010 15:01:10 +0000 (16:01 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 22 Mar 2010 12:12:19 +0000 (13:12 +0100)
test/tmarcxml.xsl

index 0298792..c5f22e6 100644 (file)
@@ -20,7 +20,7 @@
     </pz:collection>
   </xsl:template>
 
-  <xsl:template match="tmarc:record">
+  <xsl:template match="tmarc:r">
     <xsl:variable name="title_medium" select="tmarc:d245/tmarc:sh"/>
     <xsl:variable name="journal_title" select="tmarc:d773/tmarc:st"/>
     <xsl:variable name="electronic_location_url" select="tmarc:d856/tmarc:su"/>
         </pz:metadata>
       </xsl:for-each>
 
-       <pz:metadata tag="tag100">
-               <xsl:call-template name="shortTitle">
-                       <xsl:with-param name="tag" select="100" />
-               </xsl:call-template>
-       </pz:metadata>
-
-       <!-- Stuff for FRBR workset key -->
-       <xsl:variable name="title130">
-               <xsl:for-each select="tmarc:d130" >
-               <xsl:value-of select="tmarc:sa" />
-                       <xsl:value-of select="tmarc:sm" />
-                       <xsl:value-of select="tmarc:sn" />
-               <xsl:value-of select="tmarc:sp" />      
-               <xsl:value-of select="tmarc:sr" />
-               </xsl:for-each>         
-       </xsl:variable>
-
-       <xsl:variable name="title240">
-               <xsl:for-each select="tmarc:d240" >
-                       <xsl:value-of select="tmarc:sa" />
-                               <xsl:value-of select="tmarc:sm" />
-                   <xsl:value-of select="tmarc:sn" />
-                   <xsl:value-of select="tmarc:sp" />  
-                   <xsl:value-of select="tmarc:sr" />
-               </xsl:for-each>         
-       </xsl:variable>
-       <xsl:variable name="title242">
-               <xsl:for-each select="tmarc:d242" >
-                               <xsl:value-of select="tmarc:sa" />
-                               <xsl:if test="$contains110 and not($hasAuthorFields)">
-                                       <xsl:value-of select="tmarc:sb" />
-                       <xsl:value-of select="tmarc:sf" />
-                           <xsl:value-of select="tmarc:sg" />  
-                       <xsl:value-of select="tmarc:sn" />
-                       <xsl:value-of select="tmarc:sp" />
-                               </xsl:if>
-               </xsl:for-each>         
-       </xsl:variable>
-       <xsl:variable name="title242-full">
-               <xsl:for-each select="tmarc:d242" >
-                               <xsl:value-of select="tmarc:sa" />
-                               <xsl:value-of select="tmarc:sb" />
-               <xsl:value-of select="tmarc:sf" />
-                   <xsl:value-of select="tmarc:sg" />  
-               <xsl:value-of select="tmarc:sn" />
-               <xsl:value-of select="tmarc:sp" />
-               </xsl:for-each>         
-       </xsl:variable>
-
-       <xsl:variable name="title245">
-               <xsl:for-each select="tmarc:d245" >
-                               <xsl:value-of select="tmarc:sa" />
-                               <xsl:if test="$contains110 and not($hasAuthorFields)">
-                                       <xsl:value-of select="tmarc:sb" />
-                       <xsl:value-of select="tmarc:sf" />
-                           <xsl:value-of select="tmarc:sg" />  
-                       <xsl:value-of select="tmarc:sn" />
-                       <xsl:value-of select="tmarc:sp" />
-                               </xsl:if>
-               </xsl:for-each>         
-       </xsl:variable>
-       <xsl:variable name="title245-full">
-               <xsl:for-each select="tmarc:d245" >
-                       <xsl:value-of select="tmarc:sa" />
-                       <xsl:value-of select="tmarc:sb" />
-               <xsl:value-of select="tmarc:sf" />
-                   <xsl:value-of select="tmarc:sg" />  
-               <xsl:value-of select="tmarc:sn" />
-               <xsl:value-of select="tmarc:sp" />
-               </xsl:for-each>         
-       </xsl:variable>
-
-       <xsl:variable name="title246">
-               <xsl:for-each select="tmarc:d246" >
-                       <xsl:value-of select="tmarc:sa" />
-                       <xsl:if test="$contains110 and not($hasAuthorFields)">
-                               <xsl:value-of select="tmarc:sb" />
-               <xsl:value-of select="tmarc:sf" />
-                   <xsl:value-of select="tmarc:sg" />  
-               <xsl:value-of select="tmarc:sn" />
-               <xsl:value-of select="tmarc:sp" />
-                       </xsl:if>
-               </xsl:for-each>         
-       </xsl:variable>
-       <xsl:variable name="title246-full">
-               <xsl:for-each select="tmarc:d246" >
-                       <xsl:value-of select="tmarc:sa" />
-                       <xsl:value-of select="tmarc:sb" />
-               <xsl:value-of select="tmarc:sf" />
-                   <xsl:value-of select="tmarc:sg" />  
-               <xsl:value-of select="tmarc:sn" />
-               <xsl:value-of select="tmarc:sp" />
-               </xsl:for-each>         
-       </xsl:variable>
-
-       <xsl:variable name="title247">
-               <xsl:for-each select="tmarc:d247" >
-                       <xsl:value-of select="tmarc:sa" />
-                       <xsl:if test="$contains110 and not($hasAuthorFields)">
-                               <xsl:value-of select="tmarc:sb" />
-               <xsl:value-of select="tmarc:sf" />
-                   <xsl:value-of select="tmarc:sg" />  
-               <xsl:value-of select="tmarc:sn" />
-               <xsl:value-of select="tmarc:sp" />
-                       </xsl:if>
-               </xsl:for-each>         
-       </xsl:variable>
-       <xsl:variable name="title247-full">
-               <xsl:for-each select="tmarc:d247" >
-                       <xsl:value-of select="tmarc:sa" />
-                       <xsl:value-of select="tmarc:sb" />
-               <xsl:value-of select="tmarc:sf" />
-                   <xsl:value-of select="tmarc:sg" />  
-               <xsl:value-of select="tmarc:sn" />
-               <xsl:value-of select="tmarc:sp" />
-               </xsl:for-each>         
-       </xsl:variable>
-
-      <xsl:for-each select="tmarc:c008">
-        <pz:metadata type="meta-marc-cf008">
-          <xsl:value-of select="."/>
-        </pz:metadata>
-      </xsl:for-each>
-
-       <pz:metadata type="meta-frbr-short-title">
-               <xsl:choose>
-               <xsl:when test="$title130!=''">
-                       <xsl:value-of select="$title130" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240!=''">
-                       <xsl:value-of select="$title240" />
-               </xsl:when>             
-                       <!-- Missing the prioritization of 246 on non-english records  -->
-               <xsl:when test="$title130='' and $title240='' and $title242!=''">
-                       <xsl:value-of select="$title242" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240='' and $title242='' and $title245!=''">
-                       <xsl:value-of select="$title245" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240='' and $title242='' and $title246!=''">
-                       <xsl:value-of select="$title246" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240='' and $title242='' and $title246='' and $title247!=''">
-                       <xsl:value-of select="$title247" />
-               </xsl:when>             
-               </xsl:choose>
-       </pz:metadata>
-
-       <pz:metadata type="meta-frbr-full-title">
-               <xsl:choose>
-               <xsl:when test="$title130!=''">
-                       <xsl:value-of select="$title130" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240!=''">
-                       <xsl:value-of select="$title240" />
-               </xsl:when>             
-                       <!-- Missing the prioritization of 246 on non-english records  -->
-               <xsl:when test="$title130='' and $title240='' and $title242!=''">
-                       <xsl:value-of select="$title242-full" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240='' and $title242='' and $title245!=''">
-                       <xsl:value-of select="$title245-full" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240='' and $title242='' and $title246!=''">
-                       <xsl:value-of select="$title246-full" />
-               </xsl:when>             
-               <xsl:when test="$title130='' and $title240='' and $title242='' and $title246='' and $title247!=''">
-                       <xsl:value-of select="$title247-full" />
-               </xsl:when>             
-               </xsl:choose>
-       </pz:metadata>
-
-
-       <pz:metadata type="meta-frbr-lang">
-               <xsl:value-of select="$control_lang" />
-       </pz:metadata>
-
-
       <!-- passthrough id data -->
       <xsl:for-each select="pz:metadata">
           <xsl:copy-of select="."/>