Bugzilla – Attachment 51119 Details for
Bug 16343
7XX XSLT subfields displaying out of order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16343: 7XX XSLT subfields displaying out of order
Bug-16343-7XX-XSLT-subfields-displaying-out-of-ord.patch (text/plain), 40.54 KB, created by
Héctor Eduardo Castro Avalos
on 2016-05-02 21:29:11 UTC
(
hide
)
Description:
Bug 16343: 7XX XSLT subfields displaying out of order
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-05-02 21:29:11 UTC
Size:
40.54 KB
patch
obsolete
>From 92060b90bdd0abccdeb1721eb71c9d55cade9d50 Mon Sep 17 00:00:00 2001 >From: Hector Castro <hector.hecaxmmx@gmail.com> >Date: Thu, 28 Apr 2016 13:34:13 -0600 >Subject: [PATCH] Bug 16343: 7XX XSLT subfields displaying out of order > >This patch respect previous css classes >.authordates and .relatorcode but also include .titleportion > >.authordates {display: none;} >.titleportion {display: none;} >.relatorcode {display: none;} > >To test: >- Stage the two record attached wit titles: > - Surface & coatings technology. > - Women crime writers >- Reindex zebra (necessary to Opac and Itranet results) >- Leave empty the OPACUserCSS and IntranetUserCSS sysprefs >- Go to the new records in OPAC and Intranet detail page >- Look the wrong display of dates >- Apply patch and refresh the page >- Test in OPACUserCSS and IntranetUserCSS the css stated before >- Play deleting or adding the classes >- Test with multiple records with 700 (with and without dates, etc; > 710 and 711) > >NOTE: dates in 710 and 711 can be hidden with .titleportion class >dates in this kind of heading go with another data for example: >Catholic Church. Plenary Council of Baltimore (2nd : 1866) >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 220 +++++++++++++++----- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 78 +++++-- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 160 ++++++++++++-- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 80 +++++-- > 4 files changed, 437 insertions(+), 101 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index d3b4997..2e7acd0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1185,59 +1185,179 @@ > <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:choose> >- <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">abceqt</xsl:when> >- <xsl:otherwise>abcjqt</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, and d are handled separately --> >- <xsl:when test="@tag=700 or @tag=710 or @tag=711"> >- <xsl:variable name="str"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param> >- </xsl:call-template> >- </xsl:variable> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:value-of select="$str"/> >- </xsl:with-param> >- <xsl:with-param name="punctuation"> >- <xsl:text>:,;/. </xsl:text> >- </xsl:with-param> >- </xsl:call-template> >- </xsl:when> >- </xsl:choose> >- <xsl:if test="marc:subfield[@code='d']"> >- <span class="authordates"> >- <xsl:text> </xsl:text> >- <xsl:value-of select="marc:subfield[@code='d']"/> >- </span> >- </xsl:if> >- <!-- add relator code too between brackets--> >+ <xsl:choose> >+ <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, Display only name portion in 1XX --> >+ <xsl:when test="@tag=111">aeq</xsl:when> >+ <xsl:when test="@tag=110">ab</xsl:when> >+ <xsl:otherwise>abcjq</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> >+ <!-- Display only name and title portion in 110 field --> >+ <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display only name and title portion in 111 field --> >+ <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdgnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display only dates in 100 field --> >+ <xsl:if test="@tag=100 and marc:subfield[@code='d']"> >+ <span class="authordates"> >+ <xsl:text>, </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">d</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ >+ </xsl:when> >+ <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works --> >+ <!--#13382 Added all relevant subfields 4, e, and d are handled separately --> >+ <xsl:when test="@tag=700 or @tag=710 or @tag=711"> >+ <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields --> >+ <xsl:if test="@tag=710 or @tag=711"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes"> >+ <xsl:choose> >+ <xsl:when test="@tag=711">aeq</xsl:when> >+ <xsl:otherwise>ab</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> >+ <!-- Display only name and title portion in 711 field --> >+ <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdgnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display only name and title portion in 710 field --> >+ <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ >+ </xsl:if> >+ <!-- Display only name portion in 700 field --> >+ <xsl:if test="@tag=700"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcq</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:if> >+ <!-- Display class "authordates" in 700 field --> >+ <xsl:if test="@tag=700 and marc:subfield[@code='d']"> >+ <span class="authordates"> >+ <xsl:text>, </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">d</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display class "titleportion" in 700 field --> >+ <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/> >+ <xsl:if test="@tag=700 and $titleportionfields"> >+ <span class="titleportion"> >+ <xsl:text>. </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ >+ </xsl:when> >+ </xsl:choose> >+ >+ <!-- add relator code too between brackets--> > <!-- #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:when test="@tag=111 or @tag=711"> > <xsl:choose> >- <!-- Prefer j over 4 --> >+ <!-- Prefer j over 4 for fields 111 and 711--> > <xsl:when test="marc:subfield[@code='j']"> > <xsl:for-each select="marc:subfield[@code='j']"> > <xsl:value-of select="."/> >@@ -1252,8 +1372,8 @@ > </xsl:otherwise> > </xsl:choose> > </xsl:when> >- <!-- Prefer e over 4 --> >- <xsl:when test="marc:subfield[@code='e']"> >+ <!-- Prefer e over 4 for fields 111 and 711--> >+ <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]"> > <xsl:for-each select="marc:subfield[@code='e']"> > <xsl:value-of select="."/> > <xsl:if test="position() != last()">, </xsl:if> >@@ -1269,7 +1389,7 @@ > <xsl:text>]</xsl:text> > </span> > </xsl:if> >- </a> >+ </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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 839e1ac..de4e772 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -341,13 +341,6 @@ > <p class="author">by > <!-- #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'"> >@@ -363,8 +356,9 @@ > <xsl:with-param name="codes"> > <xsl:choose> > <!-- #13383 include subfield e for field 111 --> >- <xsl:when test="@tag=111">abceqt</xsl:when> >- <xsl:otherwise>abcjqt</xsl:otherwise> >+ <xsl:when test="@tag=111 or @tag=711">aeq</xsl:when> >+ <xsl:when test="@tag=110 or @tag=710">ab</xsl:when> >+ <xsl:otherwise>abcjq</xsl:otherwise> > </xsl:choose> > </xsl:with-param> > </xsl:call-template> >@@ -373,18 +367,72 @@ > <xsl:text>:,;/ </xsl:text> > </xsl:with-param> > </xsl:call-template> >- </a> >- <xsl:if test="marc:subfield[@code='d']"> >+ <!-- Display title portion for 110 and 710 fields --> >+ <xsl:if test="(@tag=110 or @tag=710) and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display title portion for 111 adn 711 fields --> >+ <xsl:if test="(@tag=111 or @tag=711) and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdgnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display dates for 100 and 700 fields --> >+ <xsl:if test="(@tag=100 or @tag=700) and marc:subfield[@code='d']"> > <span class="authordates"> >- <xsl:text> </xsl:text> >- <xsl:value-of select="marc:subfield[@code='d']"/> >+ <xsl:text>, </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">d</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display title portion for 100 and 700 fields --> >+ <xsl:if test="@tag=700 and marc:subfield[@code='t']"> >+ <span class="titleportion"> >+ <xsl:text>. </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> > </span> > </xsl:if> >+ </a> >+ <!-- Display display relators for 1XX and 7XX fields --> > <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:when test="@tag=111 or @tag=711"> > <xsl:choose> > <!-- Prefer j over 4 --> > <xsl:when test="marc:subfield[@code='j']"> >@@ -403,7 +451,7 @@ > </xsl:when> > <!-- Prefer e over 4 --> > <xsl:when test="marc:subfield[@code='e']"> >- <xsl:for-each select="marc:subfield[@code='e']"> >+ <xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]"> > <xsl:value-of select="."/> > <xsl:if test="position() != last()">, </xsl:if> > </xsl:for-each> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index d3473e0..a8622f3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1294,9 +1294,10 @@ > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes"> > <xsl:choose> >- <!-- #13383 include subfield e for field 111 --> >- <xsl:when test="@tag=111">abceqt</xsl:when> >- <xsl:otherwise>abcjqt</xsl:otherwise> >+ <!-- #13383 include subfield e for field 111, Display only name portion in 1XX --> >+ <xsl:when test="@tag=111">aeq</xsl:when> >+ <xsl:when test="@tag=110">ab</xsl:when> >+ <xsl:otherwise>abcjq</xsl:otherwise> > </xsl:choose> > </xsl:with-param> > </xsl:call-template> >@@ -1305,40 +1306,159 @@ > <xsl:text>:,;/ </xsl:text> > </xsl:with-param> > </xsl:call-template> >+ <!-- Display only name and title portion in 110 field --> >+ <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display only name and title portion in 111 field --> >+ <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdgnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display only dates in 100 field --> >+ <xsl:if test="@tag=100 and marc:subfield[@code='d']"> >+ <span class="authordates"> >+ <xsl:text>, </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">d</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> > </xsl:when> > <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works --> > <!--#13382 Added all relevant subfields 4, e, and d are handled separately --> > <xsl:when test="@tag=700 or @tag=710 or @tag=711"> >- <xsl:variable name="str"> >+ <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields --> >+ <xsl:if test="@tag=710 or @tag=711"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> > <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param> >+ <xsl:with-param name="codes"> >+ <xsl:choose> >+ <xsl:when test="@tag=711">aeq</xsl:when> >+ <xsl:otherwise>ab</xsl:otherwise> >+ </xsl:choose> >+ </xsl:with-param> > </xsl:call-template> >- </xsl:variable> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template> >+ <!-- Display only name and title portion in 711 field --> >+ <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdgnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display only name and title portion in 710 field --> >+ <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ >+ </xsl:if> >+ <!-- Display only name portion in 700 field --> >+ <xsl:if test="@tag=700"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcq</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:if> >+ <!-- Display class "authordates" in 700 field --> >+ <xsl:if test="@tag=700 and marc:subfield[@code='d']"> >+ <span class="authordates"> >+ <xsl:text>, </xsl:text> > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> >- <xsl:value-of select="$str"/> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">d</xsl:with-param> >+ </xsl:call-template> > </xsl:with-param> >- <xsl:with-param name="punctuation"> >- <xsl:text>:,;/. </xsl:text> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display class "titleportion" in 700 field --> >+ <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/> >+ <xsl:if test="@tag=700 and $titleportionfields"> >+ <span class="titleportion"> >+ <xsl:text>. </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param> >+ </xsl:call-template> > </xsl:with-param> > </xsl:call-template> >+ </span> >+ </xsl:if> >+ > </xsl:when> > </xsl:choose> > </span></span></span> >- <xsl:if test="marc:subfield[@code='d']"> >- <span class="authordates"> >- <xsl:text> </xsl:text> >- <xsl:value-of select="marc:subfield[@code='d']"/> >- </span> >- </xsl:if> >- <!-- #13383 include relator code j for field 111 --> >+ >+ <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' --> > <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:when test="@tag=111 or @tag=711"> > <xsl:choose> >- <!-- Prefer j over 4 --> >+ <!-- Prefer j over 4 for 111 and 711 --> > <xsl:when test="marc:subfield[@code='j']"> > <xsl:for-each select="marc:subfield[@code='j']"> > <xsl:value-of select="."/> >@@ -1353,8 +1473,8 @@ > </xsl:otherwise> > </xsl:choose> > </xsl:when> >- <!-- Prefer e over 4 --> >- <xsl:when test="marc:subfield[@code='e']"> >+ <!-- Prefer e over 4 on 100 and 110--> >+ <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]"> > <xsl:for-each select="marc:subfield[@code='e']"> > <xsl:value-of select="."/> > <xsl:if test="position() != last()">, </xsl:if> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 01e3c1c..ccf5225 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -457,21 +457,15 @@ > by <span class="author"> > <!-- #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">abceqt</xsl:when> >- <xsl:otherwise>abcjqt</xsl:otherwise> >+ <xsl:when test="@tag=111 or @tag=711">aeq</xsl:when> >+ <xsl:when test="@tag=110 or @tag=710">ab</xsl:when> >+ <xsl:otherwise>abcjq</xsl:otherwise> > </xsl:choose> > </xsl:with-param> > </xsl:call-template> >@@ -480,19 +474,73 @@ > <xsl:text>:,;/ </xsl:text> > </xsl:with-param> > </xsl:call-template> >- <xsl:if test="marc:subfield[@code='d']"> >+ <!-- Display title portion for 110 and 710 fields --> >+ <xsl:if test="(@tag=110 or @tag=710) and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display title portion for 111 adn 711 fields --> >+ <xsl:if test="(@tag=111 or @tag=711) and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])"> >+ <span class="titleportion"> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise> >+ </xsl:choose> >+ >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">cdgnt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display dates for 100 and 700 fields --> >+ <xsl:if test="(@tag=100 or @tag=700) and marc:subfield[@code='d']"> > <span class="authordates"> >- <xsl:text> </xsl:text> >- <xsl:value-of select="marc:subfield[@code='d']"/> >+ <xsl:text>, </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">d</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display title portion for 100 and 700 fields --> >+ <xsl:if test="@tag=700 and marc:subfield[@code='t']"> >+ <span class="titleportion"> >+ <xsl:text>. </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> > </span> > </xsl:if> >+ <!-- Display display relators for 1XX and 7XX fields --> > <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:when test="@tag=111 or @tag=711"> > <xsl:choose> >- <!-- Prefer j over 4 --> >+ <!-- Prefer j over 4 for 111 and 711 --> > <xsl:when test="marc:subfield[@code='j']"> > <xsl:for-each select="marc:subfield[@code='j']"> > <xsl:value-of select="."/> >@@ -507,9 +555,9 @@ > </xsl:otherwise> > </xsl:choose> > </xsl:when> >- <!-- Prefer e over 4 --> >+ <!-- Prefer e over 4 on 100 and 110 --> > <xsl:when test="marc:subfield[@code='e']"> >- <xsl:for-each select="marc:subfield[@code='e']"> >+ <xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]"> > <xsl:value-of select="."/> > <xsl:if test="position() != last()">, </xsl:if> > </xsl:for-each> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16343
:
50667
|
50950
|
50952
|
51045
|
51118
|
51119
|
51190
|
51225
|
51226
|
51613