<xsl:for-each select="$authorfield">
<xsl:choose>
<xsl:when test="position()>1"/>
- <xsl:when test="@tag<700">Author(s): </xsl:when>
+ <!-- #13383 -->
+ <xsl:when test="@tag<700">By: </xsl:when>
<!--#13382 Changed Additional author to contributor -->
<xsl:otherwise>Contributor(s): </xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
- <xsl:when test="@tag=100"><xsl:call-template name="nameABCQ"/></xsl:when>
- <xsl:when test="@tag=110"><xsl:call-template name="nameABCDN"/></xsl:when>
- <xsl:when test="@tag=111"><xsl:call-template name="nameACDEQ"/></xsl:when>
+ <xsl:when test="@tag=100 or @tag=110 or @tag=111">
+ <!-- #13383 -->
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <!-- #13383 include subfield e for field 111 -->
+ <xsl:when test="@tag=111">abcdeqt</xsl:when>
+ <xsl:otherwise>abcdjqt</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
<!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
<!--#13382 Added all relevant subfields 4, e, are handled separately -->
<xsl:when test="@tag=700 or @tag=710 or @tag=711">
</xsl:choose>
<!-- add relator code too between brackets-->
- <xsl:if test="marc:subfield[@code='4' or @code='e']">
- <span class="relatorcode">
- <xsl:text> [</xsl:text>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code='e']">
- <xsl:for-each select="marc:subfield[@code='e']">
- <xsl:value-of select="."/>
- <xsl:if test="position() != last()">, </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="marc:subfield[@code=4]">
- <xsl:value-of select="."/>
- <xsl:if test="position() != last()">, </xsl:if>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>]</xsl:text>
- </span>
- </xsl:if>
+ <!-- #13383 include relator code j for field 111 -->
+ <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
+ <span class="relatorcode">
+ <xsl:text> [</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@tag=111">
+ <xsl:choose>
+ <!-- Prefer j over 4 -->
+ <xsl:when test="marc:subfield[@code='j']">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code=4]">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- Prefer e over 4 -->
+ <xsl:when test="marc:subfield[@code='e']">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code=4]">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>]</xsl:text>
+ </span>
+ </xsl:if>
</a>
<xsl:choose>
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
<xsl:choose>
<xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
<p class="author">by
- <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700) and @ind1!='z']">
- <a>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="nameABCQ"/></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:for-each>
-
- <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']">
- <a>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="nameABCDN"/></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:for-each>
-
- <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']">
- <xsl:choose>
- <xsl:when test="marc:subfield[@code='n']">
- <xsl:text> </xsl:text>
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:when>
- </xsl:choose>
- <a>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="nameACDEQ"/></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:for-each>
+ <!-- #13383 -->
+ <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700 or @tag=110 or @tag=710 or @tag=111 or @tag=711) and @ind1!='z']">
+ <xsl:if test="@tag=111 or @tag=711 and marc:subfield[@code='n']">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">n</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <a>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <!-- #13383 include subfield e for field 111 -->
+ <xsl:when test="@tag=111">abcdeqt</xsl:when>
+ <xsl:otherwise>abcdjqt</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
+ <span class="relatorcode">
+ <xsl:text> [</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@tag=111">
+ <xsl:choose>
+ <!-- Prefer j over 4 -->
+ <xsl:when test="marc:subfield[@code='j']">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code=4]">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- Prefer e over 4 -->
+ <xsl:when test="marc:subfield[@code='e']">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code=4]">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>]</xsl:text>
+ </span>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</p>
</xsl:when>
</xsl:choose>
<xsl:for-each select="$authorfield">
<xsl:choose>
<xsl:when test="position()>1"/>
- <xsl:when test="@tag<700">Author(s): </xsl:when>
+ <!-- #13383 -->
+ <xsl:when test="@tag<700">By: </xsl:when>
<!--#13382 Changed Additional author to contributor -->
<xsl:otherwise>Contributor(s): </xsl:otherwise>
</xsl:choose>
</xsl:choose>
<span property="name">
<xsl:choose>
- <xsl:when test="@tag=100"><xsl:call-template name="nameABCQ"/></xsl:when>
- <xsl:when test="@tag=110"><xsl:call-template name="nameABCDN"/></xsl:when>
- <xsl:when test="@tag=111"><xsl:call-template name="nameACDEQ"/></xsl:when>
+ <xsl:when test="@tag=100 or @tag=110 or @tag=111">
+ <!-- #13383 -->
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <!-- #13383 include subfield e for field 111 -->
+ <xsl:when test="@tag=111">abcdeqt</xsl:when>
+ <xsl:otherwise>abcdjqt</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
<!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
<!--#13382 Added all relevant subfields 4, e, are handled separately -->
<xsl:when test="@tag=700 or @tag=710 or @tag=711">
</xsl:when>
</xsl:choose>
</span></span></span>
- <!-- add relator code too between brackets-->
- <xsl:if test="marc:subfield[@code='4' or @code='e']">
+ <!-- #13383 include relator code j for field 111 -->
+ <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
<span class="relatorcode">
<xsl:text> [</xsl:text>
<xsl:choose>
+ <xsl:when test="@tag=111">
+ <xsl:choose>
+ <!-- Prefer j over 4 -->
+ <xsl:when test="marc:subfield[@code='j']">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code=4]">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- Prefer e over 4 -->
<xsl:when test="marc:subfield[@code='e']">
<xsl:for-each select="marc:subfield[@code='e']">
<xsl:value-of select="."/>
</xsl:element>
</a>
</xsl:if>
- </xsl:for-each>
- <xsl:choose>
- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</h5>
</xsl:if>
</xsl:template>
<xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
by <span class="author">
- <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700) and @ind1!='z']">
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:call-template name="nameABCQ"/>.
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="nameABCQ"/>;
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
-
- <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']">
- <xsl:choose>
- <xsl:when test="position()=1">
- <xsl:text> -- </xsl:text>
- </xsl:when>
- </xsl:choose>
+ <!-- #13383 -->
+ <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700 or @tag=110 or @tag=710 or @tag=111 or @tag=711) and @ind1!='z']">
+ <xsl:if test="@tag=111 or @tag=711 and marc:subfield[@code='n']">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">n</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <!-- #13383 include subfield e for field 111 -->
+ <xsl:when test="@tag=111">abcdeqt</xsl:when>
+ <xsl:otherwise>abcdjqt</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
+ <span class="relatorcode">
+ <xsl:text> [</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@tag=111">
+ <xsl:choose>
+ <!-- Prefer j over 4 -->
+ <xsl:when test="marc:subfield[@code='j']">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code=4]">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- Prefer e over 4 -->
+ <xsl:when test="marc:subfield[@code='e']">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code=4]">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>]</xsl:text>
+ </span>
+ </xsl:if>
<xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:call-template name="nameABCDN"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="nameABCDN"/>;
- </xsl:otherwise>
+ <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
- <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']">
- <xsl:choose>
- <xsl:when test="position()=1">
- <xsl:text> -- </xsl:text>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code='n']">
- <xsl:text> </xsl:text>
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">n</xsl:with-param>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:call-template name="nameACDEQ"/>.
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="nameACDEQ"/>;
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
</span>
</xsl:when>
</xsl:choose>