Bugzilla – Attachment 37448 Details for
Bug 13382
RDA: 700/710/711 display in XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13382 - RDA: 700/710/711 display in XSLT
Bug-13382---RDA-700710711-display-in-XSLT.patch (text/plain), 29.36 KB, created by
Winona Salesky
on 2015-04-02 17:00:43 UTC
(
hide
)
Description:
Bug 13382 - RDA: 700/710/711 display in XSLT
Filename:
MIME Type:
Creator:
Winona Salesky
Created:
2015-04-02 17:00:43 UTC
Size:
29.36 KB
patch
obsolete
>From 41025385ccc8c785287666624bc8655bc93b38a3 Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Thu, 2 Apr 2015 12:58:06 -0400 >Subject: [PATCH] Bug 13382 - RDA: 700/710/711 display in XSLT > >Test Plan: >1) Apply this patch >2) Ensure you are using the default XSLT setting for the staff and opac search results and record details >3) Find or create a record with MARC tags 700,710,711 >4) Perform an opac search that would show the record in the search results. >5) Click title to review record. >6) Note the fields updates 700,710,711 to show subfields a, b, c, d, e, f, g, h, i, k, l, m, n, o, p, r, s, t, u, x. Multiple fields are separated by span class=separator |. Adds Related and Contained Works as new headings. >7) Repeat steps 4 - 6 for the staff interface >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 179 ++++++++++++++---- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 207 ++++++++++++++++----- > 2 files changed, 303 insertions(+), 83 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 349dbea..9d2da8c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -3,6 +3,7 @@ > <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> > > <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> >+ > <xsl:stylesheet version="1.0" > xmlns:marc="http://www.loc.gov/MARC21/slim" > xmlns:items="http://www.koha-community.org/items" >@@ -140,9 +141,17 @@ > </xsl:if> > > <!-- Author Statement --> >- <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> >- <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> >- >+ <!-- #13382 suppress 700$i and 7xx/@ind2=2 --> >+ <xsl:call-template name="showAuthor"> >+ <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ </xsl:call-template> >+ <xsl:call-template name="showAuthor"> >+ <!-- #13382 suppress 700$i and 7xx/@ind2=2 --> >+ <xsl:with-param name="authorfield" select=" marc:datafield[(@tag=700 or @tag=710 or @tag=711) and not(@ind2=2) and not(marc:subfield[@code='i'])]"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ </xsl:call-template> >+ > <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''"> > <span class="results_summary type"><span class="label">Material type: </span> > <xsl:element name="img"><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element> >@@ -524,7 +533,90 @@ > </xsl:for-each> > </span> > </xsl:if> >- >+ >+ <!-- #13382 Added Related works 700$i --> >+ <xsl:if test="marc:datafield[@tag=700][marc:subfield[@code='i']] or marc:datafield[@tag=710][marc:subfield[@code='i']] or marc:datafield[@tag=711][marc:subfield[@code='i']]"> >+ <span class="results_summary related_works"><span class="label">Related Works: </span> >+ <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='i']] | marc:datafield[@tag=710][marc:subfield[@code='i']] | marc:datafield[@tag=711][marc:subfield[@code='i']]"> >+ <xsl:variable name="str"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdfghiklmnporstux</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:call-template> >+ <!-- 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:text>, </xsl:text></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:text>, </xsl:text></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> >+ </span> >+ </xsl:if> >+ >+ <!-- #13382 Added Contained Works 7xx@ind2=2 --> >+ <xsl:if test="marc:datafield[@tag=700][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=710][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=711][@ind2=2 and not(marc:subfield[@code='i'])]"> >+ <span class="results_summary contained_works"><span class="label">Contained Works: </span> >+ <xsl:for-each select="marc:datafield[@tag=700][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=710][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=711][@ind2=2][not(marc:subfield[@code='i'])]"> >+ <xsl:variable name="str"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdfghiklmnporstux</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:call-template> >+ <!-- 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:text>, </xsl:text></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:text>, </xsl:text></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> >+ </span> >+ </xsl:if> > <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> > <span class="results_summary subjects"><span class="label">Subject(s): </span> > <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> >@@ -565,22 +657,6 @@ > </span> > </xsl:if> > >-<!-- DDC classification --> >- <xsl:if test="marc:datafield[@tag=082]"> >- <span class="results_summary ddc"> >- <span class="label">DDC classification: </span> >- <xsl:for-each select="marc:datafield[@tag=082]"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >- <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >- <xsl:otherwise> | </xsl:otherwise> >- </xsl:choose> >- </xsl:for-each> >- </span> >- </xsl:if> >- > <xsl:if test="marc:datafield[@tag=856]"> > <span class="results_summary online_resources"><span class="label">Online resources: </span> > <xsl:for-each select="marc:datafield[@tag=856]"> >@@ -965,7 +1041,8 @@ > <xsl:choose> > <xsl:when test="position()>1"/> > <xsl:when test="@tag<700">Author(s): </xsl:when> >- <xsl:otherwise>Additional author(s): </xsl:otherwise> >+ <!--#13382 Changed Additional author to contributor --> >+ <xsl:otherwise>Contributor(s): </xsl:otherwise> > </xsl:choose> > <a> > <xsl:choose> >@@ -977,28 +1054,58 @@ > </xsl:otherwise> > </xsl:choose> > <xsl:choose> >- <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when> >- <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> >- <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> >+ <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> >+ <!-- #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:variable name="str"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdfghiklmnoprstux</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> > <!-- 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=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when> >- <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise> >- </xsl:choose> >- <xsl:text>]</xsl:text> >- </span> >- </xsl:if> >+ <xsl:if test="marc:subfield[@code='4' or @code='e']"> >+ <xsl:if test="not(@tag=111 or @tag=711)"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <!-- #13382 If both $e and $4 are present only display $e --> >+ <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:text>, </xsl:text></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:text>, </xsl:text></xsl:if> >+ </xsl:for-each> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> >+ </xsl:if> > </a> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></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> > </h5> > </xsl:if> > </xsl:template> > >-</xsl:stylesheet> >+</xsl:stylesheet> >\ No newline at end of file >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 11624c4..8f575a0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1,5 +1,6 @@ > <?xml version="1.0" encoding="UTF-8"?> > <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> >+ > <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> > <xsl:stylesheet version="1.0" > xmlns:marc="http://www.loc.gov/MARC21/slim" >@@ -158,19 +159,19 @@ > </xsl:call-template> > </h5> > </xsl:if> >- <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]"> >- <h5 class="author">by >- <xsl:call-template name="showAuthor"> >- <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111 or @tag=700 or @tag=710 or @tag=711]"/> >- <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >- <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/> >- <xsl:with-param name="theme" select="$theme"/> >- </xsl:call-template> >- </h5> >- </xsl:when> >- </xsl:choose> >- >+ >+ <!--#13382 Added Author Statement to seperate Authors and Contributors --> >+ <xsl:call-template name="showAuthor"> >+ <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/> >+ <xsl:with-param name="theme" select="$theme"/> >+ </xsl:call-template> >+ <xsl:call-template name="showAuthor"> >+ <!-- #13382 suppress 700$i and 7xx/@ind2=2 --> >+ <xsl:with-param name="authorfield" select=" marc:datafield[(@tag=700 or @tag=710 or @tag=711) and not(@ind2=2) and not(marc:subfield[@code='i'])]"/> >+ <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> >+ </xsl:call-template> > <xsl:if test="$DisplayOPACiconsXSLT!='0'"> > <xsl:if test="$materialTypeCode!=''"> > <span class="results_summary type"><span class="label">Material type: </span> >@@ -572,6 +573,91 @@ > </span> > </xsl:if> > >+ >+ <!-- #13382 Added Related works 700$i --> >+ <xsl:if test="marc:datafield[@tag=700][marc:subfield[@code='i']] or marc:datafield[@tag=710][marc:subfield[@code='i']] or marc:datafield[@tag=711][marc:subfield[@code='i']]"> >+ <span class="results_summary related_works"><span class="label">Related Works: </span> >+ <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='i']] | marc:datafield[@tag=710][marc:subfield[@code='i']] | marc:datafield[@tag=711][marc:subfield[@code='i']]"> >+ <xsl:variable name="str"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdfghiklmnporstux</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:call-template> >+ <!-- 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:text>, </xsl:text></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:text>, </xsl:text></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> >+ </span> >+ </xsl:if> >+ >+ <!-- #13382 Added Contained Works 7xx@ind2=2 --> >+ <xsl:if test="marc:datafield[@tag=700][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=710][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=711][@ind2=2 and not(marc:subfield[@code='i'])]"> >+ <span class="results_summary contained_works"><span class="label">Contained Works: </span> >+ <xsl:for-each select="marc:datafield[@tag=700][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=710][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=711][@ind2=2][not(marc:subfield[@code='i'])]"> >+ <xsl:variable name="str"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdfghiklmnporstux</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:call-template> >+ <!-- 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:text>, </xsl:text></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:text>, </xsl:text></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> >+ </span> >+ </xsl:if> >+ > <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> > <span class="results_summary subjects"><span class="label">Subject(s): </span> > <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> >@@ -625,23 +711,6 @@ > </span> > </xsl:if> > >-<!-- DDC classification --> >- <xsl:if test="marc:datafield[@tag=082]"> >- <span class="results_summary ddc"> >- <span class="label">DDC classification: </span> >- <xsl:for-each select="marc:datafield[@tag=082]"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >- <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >- <xsl:otherwise> | </xsl:otherwise> >- </xsl:choose> >- </xsl:for-each> >- </span> >- </xsl:if> >- >- > <!-- Image processing code added here, takes precedence over text links including y3z text --> > <xsl:if test="marc:datafield[@tag=856]"> > <span class="results_summary online_resources"><span class="label">Online resources: </span> >@@ -1042,10 +1111,18 @@ > <xsl:param name="UseAuthoritiesForTracings" /> > <xsl:param name="materialTypeLabel" /> > <xsl:param name="theme" /> >+ <xsl:if test="count($authorfield)>0"> >+ <!--#13382 Changed Additional author to contributor --> >+ <h5> > <xsl:for-each select="$authorfield"> >- <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose> > <xsl:choose> >- <xsl:when test="not(@tag=111 or @tag=711)" /> >+ <xsl:when test="position()>1"/> >+ <xsl:when test="@tag<700">by </xsl:when> >+ <!--#13382 Changed Additional author to contributor --> >+ <xsl:otherwise>Contributor(s): </xsl:otherwise> >+ </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711" /> > <xsl:when test="marc:subfield[@code='n']"> > <xsl:text> </xsl:text> > <xsl:call-template name="subfieldSelect"> >@@ -1084,21 +1161,52 @@ > </xsl:choose> > <span property="name"> > <xsl:choose> >- <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when> >- <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> >- <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> >+ <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> >+ <!-- #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:variable name="str"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdfghiklmnoprstux</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> >- </span></span></span> >- <!-- add relator code too between brackets--> >+ </span> >+ </span> >+ </span> >+ <!-- #13382 If both $e and $4 are present only display $e --> > <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=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when> >- <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise> >- </xsl:choose> >- <xsl:text>]</xsl:text> >- </span> >+ <xsl:if test="not(@tag=111 or @tag=711)"> >+ <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:text>, </xsl:text></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:text>, </xsl:text></xsl:if> >+ </xsl:for-each> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> > </xsl:if> > </a> > <xsl:if test="marc:subfield[@code=9]"> >@@ -1112,8 +1220,13 @@ > </xsl:element> > </a> > </xsl:if> >+ <!--#13382 Changed separator to | --> >+ <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> >- <xsl:text>.</xsl:text> >+ </h5> >+ </xsl:if> > </xsl:template> > > <xsl:template name="nameABCQ"> >@@ -1190,4 +1303,4 @@ > </xsl:variable> > <xsl:value-of select="substring($str,1,string-length($str)-1)"/> > </xsl:template> >-</xsl:stylesheet> >+</xsl:stylesheet> >\ No newline at end of file >-- >1.9.5 (Apple Git-50.3)
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 13382
:
35613
|
35647
|
35759
|
36515
|
36786
|
37073
|
37245
|
37448
|
37591
|
38299
|
38501
|
39843