Adds has_fulltext flag to tmarc as to marc21.xsl
authorNiels Erik G. Nielsen <nielserik@indexdata.com>
Fri, 3 Dec 2010 11:51:27 +0000 (12:51 +0100)
committerNiels Erik G. Nielsen <nielserik@indexdata.com>
Fri, 3 Dec 2010 11:51:27 +0000 (12:51 +0100)
etc/tmarc.xsl

index 08524ef..c93547c 100644 (file)
       </xsl:choose>
     </xsl:variable>
 
+    <xsl:variable name="has_fulltext">
+      <xsl:choose>
+        <xsl:when test="tmarc:d856/tmarc:sq">
+          <xsl:text>yes</xsl:text>
+        </xsl:when>
+        <xsl:when test="tmarc:d856/tmarc:si='TEXT*'">
+          <xsl:text>yes</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>no</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
     <pz:record>
 <!--
       <xsl:attribute name="mergekey">
       <!-- <xsl:if test="$fulltext_b"> <pz:metadata type="fulltext"> <xsl:value-of 
         select="$fulltext_b"/> </pz:metadata> </xsl:if> -->
 
+      <pz:metadata type="has-fulltext">
+        <xsl:value-of select="$has_fulltext"/>
+      </pz:metadata>
+
       <xsl:for-each select="tmarc:d907">
         <!-- or tmarc:d901"> -->
         <pz:metadata type="iii-id">