Added filler for empty circ values, to enable offset-based association between
[pazpar2-moved-to-github.git] / 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>