Bug 6496 - tidy the display of 710 fields on XSLT
authorRobin Sheat <robin@catalyst.net.nz>
Wed, 31 Aug 2011 07:59:44 +0000 (19:59 +1200)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 17 Feb 2012 17:57:41 +0000 (18:57 +0100)
This puts '--' between 710$b fields, and replaces the '.' with a '; ' if
there are additional authors.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl

index 426fa11..a00e3c2 100644 (file)
                 </xsl:call-template>
         </xsl:for-each>
         <xsl:for-each select="marc:subfield[@code='b']">
-                <xsl:value-of select="."/>
+            <xsl:value-of select="."/>
+            <xsl:choose>
+                <xsl:when test="position() != last()">
+                    <xsl:text> -- </xsl:text>
+                </xsl:when>
+            </xsl:choose>
         </xsl:for-each>
         <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
                 <xsl:call-template name="subfieldSelect">
index be2b4fd..7074cc0 100644 (file)
         </xsl:choose>
         <xsl:call-template name="nameABCDQ"/></a>
         <xsl:choose>
-        <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+        <xsl:when test="position()!=last()"><xsl:text>; </xsl:text></xsl:when></xsl:choose>
         </xsl:for-each>
 
         <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
+            <xsl:choose>
+                <xsl:when test="position()=1">
+                    <xsl:text>; </xsl:text>
+                </xsl:when>
+            </xsl:choose>
         <a>
         <xsl:choose>
             <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
                 </xsl:call-template>
         </xsl:for-each>
         <xsl:for-each select="marc:subfield[@code='b']">
-                <xsl:value-of select="."/>
+            <xsl:value-of select="."/>
+            <xsl:choose>
+                <xsl:when test="position() != last()">
+                    <xsl:text> -- </xsl:text>
+                </xsl:when>
+            </xsl:choose>
         </xsl:for-each>
         <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
                 <xsl:call-template name="subfieldSelect">