Bugzilla – Attachment 174471 Details for
Bug 37325
Automatically add punctuation to Marc21 field 260 / 264
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37325: fix XSLT for automatic punctuation of 260 and 264
Bug-37325-fix-XSLT-for-automatic-punctuation-of-26.patch (text/plain), 31.69 KB, created by
Alexander Wagner
on 2024-11-13 13:10:56 UTC
(
hide
)
Description:
Bug 37325: fix XSLT for automatic punctuation of 260 and 264
Filename:
MIME Type:
Creator:
Alexander Wagner
Created:
2024-11-13 13:10:56 UTC
Size:
31.69 KB
patch
obsolete
>From b0005957dc87461f464446afc3c03a7fffc9b900 Mon Sep 17 00:00:00 2001 >From: Alexander Wagner <alexander.wagner@desy.de> >Date: Mon, 11 Nov 2024 13:55:46 +0100 >Subject: [PATCH] Bug 37325: fix XSLT for automatic punctuation of 260 and 264 > >XSLT uses subfields for display _as they are_. Sometimes, these values >are used to build queries against Koha based on the field content. These >queries may hold punctuation chars that could potentially confuse the >search. > >- Add simple rules to strip punctuation chars in the search terms for > OPAC and intranet interfaces. > >Test plan: > >1. Call up any record holding a 260 field in Koha >2. Check the URLs of queries generated from the subfields of 260. These > show search terms including punctuation chars (`,:` etc., e.g. > `Edinburg :`) >3. Apply the patch >4. Punctuation chars should vanish from the URL and only the search term > should survive (e.g. `Edinburg`) > >For field 264 follow the procedures just outlined. > >This fix acts on _all_ records and is not restricted to records that got >their punctuation automatically. > >Sponsored-by: Deutsches Elektronen-Synchrotron DESY, Library >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 66 +++++++++++++++---- > .../en/xslt/MARC21slim2intranetResults.xsl | 36 +++++++++- > .../prog/en/xslt/MARC21slimUtils.xsl | 46 +++++++++---- > .../en/xslt/MARC21slim2OPACDetail.xsl | 50 +++++++++++--- > .../en/xslt/MARC21slim2OPACResults.xsl | 36 +++++++++- > .../bootstrap/en/xslt/MARC21slimUtils.xsl | 46 +++++++++---- > 6 files changed, 225 insertions(+), 55 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index cc231f4160..887306b097 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -46,6 +46,7 @@ > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >+ <xsl:variable name="leader18" select="substring($leader,19,1)"/> > <xsl:variable name="leader19" select="substring($leader,20,1)"/> > <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/> > <xsl:variable name="materialTypeCode"> >@@ -300,22 +301,50 @@ > <xsl:for-each select="marc:datafield[@tag=260]"> > <xsl:for-each select="marc:subfield"> > <xsl:if test="@code='a'"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute> >- <xsl:value-of select="current()"/> >- </a> >+ <span class="publisher_place" property="location"> >+ <a> >+ <!-- do not trim `.` as it is used in abbreviations --> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> >+ </a> >+ </span> > </xsl:if> > <xsl:if test="@code='b'"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute> >- <xsl:value-of select="current()"/> >- </a> >+ <span property="publisher" typeof="Organization"> >+ <span property="name" class="publisher_name"> >+ <a> >+ <!-- do not trim `.` as it is used in abbreviations --> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> >+ </a> >+ </span> >+ </span> > </xsl:if> > <xsl:if test="@code='c'"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute> >- <xsl:value-of select="current()"/> >- </a> >+ <span property="datePublished" class="publisher_date"> >+ <a> >+ <!-- do not trim `.` as it is used in abbreviations --> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> >+ </a> >+ </span> >+ </xsl:if> >+ <xsl:if test="@code='e'"> >+ <span property="location" class="manufacturer_place"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </xsl:if> >+ <xsl:if test="@code='f'"> >+ <span property="manufacturer" typeOf="Organization"> >+ <span property="name" class="manufacturer_name"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </span> >+ </xsl:if> >+ <xsl:if test="@code='q'"> >+ <span property="address" class="address"> >+ <xsl:value-of select="current()"/> >+ </span> > </xsl:if> > <xsl:if test="@code='g'"> > <xsl:call-template name="chopPunctuation"> >@@ -324,11 +353,20 @@ > </xsl:with-param> > </xsl:call-template> > </xsl:if> >- <xsl:if test="position() != last()"> >- <xsl:text> </xsl:text> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <!-- if punctuation is added automatically do not add additional spaces --> >+ <xsl:if test="position() != last()"> >+ <xsl:text> </xsl:text> >+ </xsl:if> > </xsl:if> > </xsl:for-each> > <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:if test="$leader18='c' or $leader18='n'"> >+ <!-- if punctuation is added automatically add the `.` at the end --> >+ <xsl:if test="position()=last()"> >+ <xsl:text>.</xsl:text> >+ </xsl:if> >+ </xsl:if> > </xsl:for-each> > </span> > </xsl:when> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 58faae0eac..1b5e89f0f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -32,6 +32,7 @@ > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >+ <xsl:variable name="leader18" select="substring($leader,19,1)"/> > <xsl:variable name="leader19" select="substring($leader,20,1)"/> > <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/> > <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/> >@@ -876,13 +877,38 @@ > <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> > </xsl:if> >- <xsl:text> </xsl:text> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <xsl:text> </xsl:text> >+ </xsl:if> >+ > <xsl:if test="marc:subfield[@code='b']"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">b</xsl:with-param> > </xsl:call-template> > </xsl:if> >- <xsl:text> </xsl:text> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <xsl:text> </xsl:text> >+ </xsl:if> >+ >+ >+ <xsl:if test="marc:subfield[@code='e']"> >+ <span property="location" class="manufacturer_place"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='f']"> >+ <span property="manufacturer" typeOf="Organization"> >+ <span property="name" class="manufacturer_name"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </span> >+ </xsl:if> >+ <xsl:if test="marc:sugfield[@code='q']"> >+ <span property="address" class="address"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </xsl:if> >+ > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> > <xsl:call-template name="subfieldSelect"> >@@ -891,6 +917,12 @@ > </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:if test="$leader18='c' or $leader18='n'"> >+ <!-- if punctuation is added automatically add the `.` at the end --> >+ <xsl:if test="position()=last()"> >+ <xsl:text>.</xsl:text> >+ </xsl:if> >+ </xsl:if> > </xsl:for-each> > </span> > </xsl:when> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index cbc6fc603f..27b0d983b4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -239,12 +239,15 @@ > helper named-template --> > <!-- Amended to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record) --> > <xsl:param name="show_url"/> >+ <xsl:variable name="leader" select="marc:leader"/> >+ <xsl:variable name="leader18" select="substring($leader,19,1)"/> > <xsl:choose> > <xsl:when test="marc:datafield[@tag=264 and @ind1=3]"> > <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]"> > <xsl:call-template name="showRDAtag264helper"> > <xsl:with-param name="field" select="."/> > <xsl:with-param name="url" select="$show_url"/> >+ <xsl:with-param name="leader18" select="$leader18"/> > </xsl:call-template> > </xsl:for-each> > </xsl:when> >@@ -253,14 +256,17 @@ > <xsl:call-template name="showRDAtag264helper"> > <xsl:with-param name="field" select="."/> > <xsl:with-param name="url" select="$show_url"/> >+ <xsl:with-param name="leader18" select="$leader18"/> > </xsl:call-template> > </xsl:for-each> > </xsl:otherwise> > </xsl:choose> > </xsl:template> >+ > <xsl:template name="showRDAtag264helper"> > <xsl:param name="field"/> > <xsl:param name="url"/> >+ <xsl:param name="leader18"/> > <xsl:variable name="ind2" select="$field/@ind2"/> > <span class="results_summary rda264"> > <xsl:choose> >@@ -284,23 +290,33 @@ > <xsl:for-each select="marc:subfield"> > <xsl:if test="@code='a'"> > <span class="rda264_place" property="location"> >- <xsl:value-of select="current()"/> >+ <xsl:choose> >+ <xsl:when test="$url='1'"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="current()"/> >+ </xsl:otherwise> >+ </xsl:choose> > </span> > </xsl:if> > <xsl:if test="@code='b'"> > <span property="rda264_name" typeof="Organization"> > <span property="name" class="rda264_name"> >- <xsl:choose> >- <xsl:when test="$url='1'"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute> >- <xsl:value-of select="current()"/> >- </a> >- </xsl:when> >- <xsl:otherwise> >- <xsl:value-of select="current()"/> >- </xsl:otherwise> >- </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="$url='1'"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="current()"/> >+ </xsl:otherwise> >+ </xsl:choose> > </span> > </span> > </xsl:if> >@@ -313,8 +329,10 @@ > </xsl:call-template> > </span> > </xsl:if> >- <xsl:if test="position() != last()"> >- <xsl:text> </xsl:text> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <xsl:if test="position() != last()"> >+ <xsl:text> </xsl:text> >+ </xsl:if> > </xsl:if> > </xsl:for-each> > </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index de21d62386..5951ac0506 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -48,6 +48,7 @@ > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >+ <xsl:variable name="leader18" select="substring($leader,19,1)"/> > <xsl:variable name="leader19" select="substring($leader,20,1)"/> > <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/> > <xsl:variable name="materialTypeCode"> >@@ -337,6 +338,7 @@ > <xsl:with-param name="show_url">1</xsl:with-param> > </xsl:call-template> > </xsl:when> >+ > <xsl:when test="marc:datafield[@tag=260]"> > <span class="results_summary publisher"><span class="label">Publication details: </span> > <xsl:for-each select="marc:datafield[@tag=260]"> >@@ -344,16 +346,19 @@ > <xsl:if test="@code='a'"> > <span class="publisher_place" property="location"> > <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute> >- <xsl:value-of select="current()"/> >+ <!-- do not trim `.` as it is used in abbreviations --> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> > </a> > </span> > </xsl:if> > <xsl:if test="@code='b'"> > <span property="publisher" typeof="Organization"> > <span property="name" class="publisher_name"> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute> >- <xsl:value-of select="current()"/> >+ <a> >+ <!-- do not trim `.` as it is used in abbreviations --> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> > </a> > </span> > </span> >@@ -361,11 +366,29 @@ > <xsl:if test="@code='c'"> > <span property="datePublished" class="publisher_date"> > <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute> >- <xsl:value-of select="current()"/> >+ <!-- do not trim `.` as it is used in abbreviations --> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> > </a> > </span> > </xsl:if> >+ <xsl:if test="@code='e'"> >+ <span property="location" class="manufacturer_place"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </xsl:if> >+ <xsl:if test="@code='f'"> >+ <span property="manufacturer" typeOf="Organization"> >+ <span property="name" class="manufacturer_name"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </span> >+ </xsl:if> >+ <xsl:if test="@code='q'"> >+ <span property="address" class="address"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </xsl:if> > <xsl:if test="@code='g'"> > <span property="datePublished" class="publisher_date"> > <xsl:call-template name="chopPunctuation"> >@@ -375,11 +398,20 @@ > </xsl:call-template> > </span> > </xsl:if> >- <xsl:if test="position() != last()"> >- <xsl:text> </xsl:text> >- </xsl:if> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <!-- if punctuation is added automatically do not add additional spaces --> >+ <xsl:if test="position() != last()"> >+ <xsl:text> </xsl:text> >+ </xsl:if> >+ </xsl:if> > </xsl:for-each> > <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:if test="$leader18='c' or $leader18='n'"> >+ <!-- if punctuation is added automatically add the `.` at the end --> >+ <xsl:if test="position()=last()"> >+ <xsl:text>.</xsl:text> >+ </xsl:if> >+ </xsl:if> > </xsl:for-each> > </span> > </xsl:when> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 17676f19a5..17aa719683 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -45,6 +45,7 @@ > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >+ <xsl:variable name="leader18" select="substring($leader,19,1)"/> > <xsl:variable name="leader19" select="substring($leader,20,1)"/> > <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/> > <xsl:variable name="isbn" select="marc:datafield[@tag=020]/marc:subfield[@code='a']"/> >@@ -1099,7 +1100,10 @@ > </xsl:call-template> > </span> > </xsl:if> >- <xsl:text> </xsl:text> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <xsl:text> </xsl:text> >+ </xsl:if> >+ > <xsl:if test="marc:subfield[@code='b']"> > <span property="name" class="publisher_name"> > <xsl:call-template name="subfieldSelect"> >@@ -1107,7 +1111,28 @@ > </xsl:call-template> > </span> > </xsl:if> >- <xsl:text> </xsl:text> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <xsl:text> </xsl:text> >+ </xsl:if> >+ >+ <xsl:if test="marc:subfield[@code='e']"> >+ <span property="location" class="manufacturer_place"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='f']"> >+ <span property="manufacturer" typeOf="Organization"> >+ <span property="name" class="manufacturer_name"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </span> >+ </xsl:if> >+ <xsl:if test="marc:sugfield[@code='q']"> >+ <span property="address" class="address"> >+ <xsl:value-of select="current()"/> >+ </span> >+ </xsl:if> >+ > <span property="datePublished" class="publisher_date"> > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> >@@ -1117,7 +1142,14 @@ > </xsl:with-param> > </xsl:call-template> > </span> >+ > <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:if test="$leader18='c' or $leader18='n'"> >+ <!-- if punctuation is added automatically add the `.` at the end --> >+ <xsl:if test="position()=last()"> >+ <xsl:text>.</xsl:text> >+ </xsl:if> >+ </xsl:if> > </xsl:for-each> > <xsl:if test="marc:datafield[@tag=264]"> > <xsl:text>; </xsl:text> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index eb8760d98b..7233fefd9f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -237,12 +237,15 @@ > helper named-template --> > <!-- Amended to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record) --> > <xsl:param name="show_url"/> >+ <xsl:variable name="leader" select="marc:leader"/> >+ <xsl:variable name="leader18" select="substring($leader,19,1)"/> > <xsl:choose> > <xsl:when test="marc:datafield[@tag=264 and @ind1=3]"> > <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]"> > <xsl:call-template name="showRDAtag264helper"> > <xsl:with-param name="field" select="."/> > <xsl:with-param name="url" select="$show_url"/> >+ <xsl:with-param name="leader18" select="$leader18"/> > </xsl:call-template> > </xsl:for-each> > </xsl:when> >@@ -251,14 +254,17 @@ > <xsl:call-template name="showRDAtag264helper"> > <xsl:with-param name="field" select="."/> > <xsl:with-param name="url" select="$show_url"/> >+ <xsl:with-param name="leader18" select="$leader18"/> > </xsl:call-template> > </xsl:for-each> > </xsl:otherwise> > </xsl:choose> > </xsl:template> >+ > <xsl:template name="showRDAtag264helper"> > <xsl:param name="field"/> > <xsl:param name="url"/> >+ <xsl:param name="leader18"/> > <xsl:variable name="ind2" select="$field/@ind2"/> > <span class="results_summary rda264"> > <xsl:choose> >@@ -282,23 +288,33 @@ > <xsl:for-each select="marc:subfield"> > <xsl:if test="@code='a'"> > <span class="rda264_place" property="location"> >- <xsl:value-of select="current()"/> >+ <xsl:choose> >+ <xsl:when test="$url='1'"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="current()"/> >+ </xsl:otherwise> >+ </xsl:choose> > </span> > </xsl:if> > <xsl:if test="@code='b'"> > <span property="rda264_name" typeof="Organization"> > <span property="name" class="rda264_name"> >- <xsl:choose> >- <xsl:when test="$url='1'"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute> >- <xsl:value-of select="current()"/> >- </a> >- </xsl:when> >- <xsl:otherwise> >- <xsl:value-of select="current()"/> >- </xsl:otherwise> >- </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="$url='1'"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute> >+ <xsl:value-of select="current()"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="current()"/> >+ </xsl:otherwise> >+ </xsl:choose> > </span> > </span> > </xsl:if> >@@ -311,8 +327,10 @@ > </xsl:call-template> > </span> > </xsl:if> >- <xsl:if test="position() != last()"> >- <xsl:text> </xsl:text> >+ <xsl:if test="not($leader18='c' or $leader18='n')"> >+ <xsl:if test="position() != last()"> >+ <xsl:text> </xsl:text> >+ </xsl:if> > </xsl:if> > </xsl:for-each> > </span> >-- >2.39.5
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 37325
:
174325
|
174326
|
174467
|
174468
|
174470
| 174471