Bug 4300: Fix display of textual holdings (866)

Fixed problems:
- only $z, but not $a was shown
- only first $z for each 866 field was shown
- each 866 field produced a ; even if no $z was present

After patch was applied:
- OPAC displays 866 $a and $z, separating each field with ;
- Staff displays 866 $a, $x and $z, separating each field with ;

Example(s) for testing:
866 $a1-86 (1941-1987)$xbound in 2 v. per year$zSome issues missing
866 $a1-86 (1941-1987)
866 $a--86 (1941-1897)$xinternal note
866 $zfirst note,$zsecond note

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Katrin Fischer 2012-01-16 23:05:42 +01:00 committed by Paul Poulain
parent ffbaf8e2d7
commit 7caec5a45f
2 changed files with 21 additions and 7 deletions

View file

@ -589,6 +589,18 @@
</xsl:for-each>
</xsl:if>
<!-- 866 textual holdings -->
<xsl:if test="marc:datafield[@tag=866]">
<span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
<xsl:for-each select="marc:datafield[@tag=866]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">axz</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</xsl:for-each>
</span>
</xsl:if>
<!-- 775 Other Edition -->
<xsl:if test="marc:datafield[@tag=775]">
<span class="results_summary other_editions"><span class="label">Other Editions: </span>

View file

@ -717,14 +717,16 @@
</span>
</xsl:for-each>
<!-- 866 holdings public note -->
<!-- 866 textual holdings -->
<xsl:if test="marc:datafield[@tag=866]">
<span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
<xsl:for-each select="marc:datafield[@tag=866]">
<xsl:value-of select="marc:subfield[@code='z']"/>
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</xsl:for-each>
</span>
<span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
<xsl:for-each select="marc:datafield[@tag=866]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">az</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</xsl:for-each>
</span>
</xsl:if>
<!-- 775 Other Edition -->