Bugzilla – Attachment 110304 Details for
Bug 15436
MARC21: Use semicolon between series name and volume information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15436: Use semicolon between series name and volume
Bug-15436-Use-semicolon-between-series-name-and-vo.patch (text/plain), 11.05 KB, created by
Katrin Fischer
on 2020-09-17 22:36:14 UTC
(
hide
)
Description:
Bug 15436: Use semicolon between series name and volume
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-09-17 22:36:14 UTC
Size:
11.05 KB
patch
obsolete
>From 72806bceb5ca84c04cd0f759cda19c5e2e040858 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Thu, 17 Sep 2020 11:25:15 +0000 >Subject: [PATCH] Bug 15436: Use semicolon between series name and volume > >MARC21 dictates that we should be using a ; before $v in 440, 490, >810, 811 and 830. > >This patch also introduces some additional changes to unify formatting >between the various options for cataloguing series: > >- The separator between multiple series is switched form ; to the > now commonly used | with a class for easy change of formatting. >- There was some missing logic that prevented the separator to show > up correctly between traced and untraced series. >- For some series $v was included in the link for others not. Now > $v always appears as text and only $a is linked, as this is what > we actually search for. > >To test this: >- You should be cataloguing multiple series in different ways, using > - deprecated 440 (still present in old data) > - 490, Ind. 1 = empty or 0 = not traced > - 490, Ind. 1 = 1 = traced in combination with an 8xx field > >Example (you should try a different combination!) >440 _ _ $aFirst series >490 _ _ $aSecond series ;$v1 >490 1 _ $aThird series ;$v1 (this won't show, it will use 830 for display) >830 _ _ $aThird series ;$v1 > >Without patch: >Series: First Series; Second series ; 1Third series: 1 > >With patch: >Series: First series | Second series ; 1 | Third series ; 1 >--- > .../intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 36 ++++++++++++------ > .../bootstrap/en/xslt/MARC21slimUtils.xsl | 44 ++++++++++++++-------- > 2 files changed, 54 insertions(+), 26 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index 9d0e90960a..c8426e8cbf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -410,19 +410,22 @@ > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> > <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">av</xsl:with-param> >+ <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> > </a> > <xsl:call-template name="part"/> >+ <xsl:if test="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> > <xsl:choose> > <xsl:when test="position()=last()"> > <xsl:if test="../marc:datafield[@tag=490][@ind1!=1]"> >- <xsl:text>; </xsl:text> >+ <span class="separator"> | </span> > </xsl:if> > </xsl:when> >- <xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> > </xsl:choose> > </xsl:for-each> > >@@ -432,13 +435,23 @@ > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> > <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">av</xsl:with-param> >+ <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> > </a> >- <xsl:call-template name="part"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:call-template name="part"/> >+ <xsl:if test="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> >+ <xsl:choose> >+ <xsl:when test="position()=last()"> >+ <xsl:if test="../marc:datafield[@tag=490][@ind1!=1]"> >+ <span class="separator"> | </span> >+ </xsl:if> >+ </xsl:when> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> >+ </xsl:choose> > </xsl:for-each> > <!-- 490 Series traced, Ind1 = 1 --> > <xsl:if test="marc:datafield[@tag=490][@ind1=1]"> >@@ -479,9 +492,9 @@ > <xsl:call-template name="part"/> > </xsl:otherwise> > </xsl:choose> >- <xsl:text>: </xsl:text> >+ <xsl:text> ; </xsl:text> > <xsl:value-of select="marc:subfield[@code='v']" /> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose> > </xsl:for-each> > > <xsl:for-each select="marc:datafield[@tag=830]"> >@@ -521,9 +534,10 @@ > <xsl:call-template name="part"/> > </xsl:otherwise> > </xsl:choose> >- <xsl:text>: </xsl:text> >- <xsl:value-of select="marc:subfield[@code='v']" /> >- <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="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose> > </xsl:for-each> > </xsl:if> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index 564dbd17f9..a7410d5eb3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -371,22 +371,25 @@ > <!-- 440 --> > <xsl:for-each select="marc:datafield[@tag=440]"> > <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">av</xsl:with-param> >- </xsl:call-template> >- </xsl:with-param> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">av</xsl:with-param> > </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> > </a> > <xsl:call-template name="part"/> >+ <xsl:if test="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> > <xsl:choose> > <xsl:when test="position()=last()"> > <xsl:if test="../marc:datafield[@tag=490][@ind1!=1]"> >- <xsl:text>; </xsl:text> >+ <span class="separator"> | </span> > </xsl:if> > </xsl:when> >- <xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> > </xsl:choose> > </xsl:for-each> > >@@ -396,13 +399,23 @@ > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> > <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">av</xsl:with-param> >+ <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> > </a> >- <xsl:call-template name="part"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:call-template name="part"/> >+ <xsl:if test="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> >+ <xsl:choose> >+ <xsl:when test="position()=last()"> >+ <xsl:if test="../marc:datafield[@tag=490][@ind1=1]"> >+ <span class="separator"> | </span> >+ </xsl:if> >+ </xsl:when> >+ <xsl:otherwise><span class="separator"> | </span></xsl:otherwise> >+ </xsl:choose> > </xsl:for-each> > <!-- 490 Series traced, Ind1 = 1 --> > <xsl:if test="marc:datafield[@tag=490][@ind1=1]"> >@@ -445,7 +458,7 @@ > </xsl:choose> > <xsl:text>: </xsl:text> > <xsl:value-of select="marc:subfield[@code='v']" /> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose> > </xsl:for-each> > > <xsl:for-each select="marc:datafield[@tag=830]"> >@@ -485,9 +498,10 @@ > <xsl:call-template name="part"/> > </xsl:otherwise> > </xsl:choose> >- <xsl:text>: </xsl:text> >- <xsl:value-of select="marc:subfield[@code='v']" /> >- <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="marc:subfield[@code='v']"> >+ <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" /> >+ </xsl:if> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose> > </xsl:for-each> > </xsl:if> > >-- >2.11.0
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 15436
:
46830
|
46837
|
48695
|
48696
|
110304
|
110438
|
110439
|
110480
|
110481
|
111356
|
111357