Added filler for empty circ values, to enable offset-based association between
authorSebastian Hammer <quinn@dart.(none)>
Mon, 22 Mar 2010 20:36:22 +0000 (20:36 +0000)
committerSebastian Hammer <quinn@dart.(none)>
Mon, 22 Mar 2010 20:36:22 +0000 (20:36 +0000)
elements of repeating circ nodes

etc/opac.xsl

index 57b2b5f..617a18b 100644 (file)
   <xsl:template name="record-hook">
     <xsl:for-each select="/opacRecord/holdings/holding">
       <pz:metadata type="locallocation">
-        <xsl:value-of select="localLocation"/>
+        <xsl:choose>
+         <xsl:when test="localLocation">
+           <xsl:value-of select="localLocation"/>
+         </xsl:when>
+         <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
+       </xsl:choose>
       </pz:metadata>
       <pz:metadata type="callnumber">
-        <xsl:value-of select="callNumber"/>
+        <xsl:choose>
+         <xsl:when test="callNumber">
+           <xsl:value-of select="callNumber"/>
+         </xsl:when>
+         <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
+       </xsl:choose>
       </pz:metadata>
       <pz:metadata type="publicnote">
-        <xsl:value-of select="publicNote"/>
+        <xsl:choose>
+         <xsl:when test="publicNote">
+           <xsl:value-of select="publicNote"/>
+         </xsl:when>
+         <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
+       </xsl:choose>
       </pz:metadata>
     </xsl:for-each>
   </xsl:template>