Bugzilla – Attachment 34997 Details for
Bug 13381
RDA: 245 field changes in XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13381 - RDA: 245 field changes in XSLT
Bug-13381---RDA-245-field-changes-in-XSLT.patch (text/plain), 10.37 KB, created by
Kyle M Hall (khall)
on 2015-01-07 12:16:53 UTC
(
hide
)
Description:
Bug 13381 - RDA: 245 field changes in XSLT
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-01-07 12:16:53 UTC
Size:
10.37 KB
patch
obsolete
>From e573968de9fc1bda6707febfa98ebf1e1e25d3aa Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Wed, 7 Jan 2015 07:14:43 -0500 >Subject: [PATCH] Bug 13381 - RDA: 245 field changes in XSLT > >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 62 ++++++++++++------- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 57 ++++++++++++------ > 2 files changed, 77 insertions(+), 42 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index f96c0eb..ccaa85c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1,8 +1,7 @@ > <?xml version="1.0" encoding="UTF-8"?> >- > <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> >- > <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> >+<!-- Edited: Bug 13381 [ENH] XSLT enhancements sponsored by bywater solutions 2014/12/29 WS wsalesky@gmail.com --> > <xsl:stylesheet version="1.0" > xmlns:marc="http://www.loc.gov/MARC21/slim" > xmlns:items="http://www.koha-community.org/items" >@@ -101,17 +100,11 @@ > </xsl:if> > > <xsl:if test="marc:datafield[@tag=245]"> >- <h1> >- <xsl:for-each select="marc:datafield[@tag=245]"> >+ <h1 class="title" property="name"> >+ <xsl:for-each select="marc:datafield[@tag=245]"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> >- <xsl:if test="marc:subfield[@code='h']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">h</xsl:with-param> >- </xsl:call-template> >- </xsl:if> > <xsl:if test="marc:subfield[@code='b']"> > <xsl:text> </xsl:text> > <xsl:call-template name="subfieldSelect"> >@@ -119,11 +112,21 @@ > </xsl:call-template> > </xsl:if> > <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">fgknps</xsl:with-param> >- </xsl:call-template> >- </xsl:for-each> >- </h1> >+ <!--Bug 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('fghknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- Span class around subfield h so it can be suppressed via css --> >+ <span class="title-medium"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:apply-templates/> >+ <xsl:text> </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> >+ </xsl:for-each> >+ </h1> > </xsl:if> > > <!-- Author Statement: Alternate Graphic Representation (MARC 880) --> >@@ -143,14 +146,27 @@ > <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> > >- <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> >- <xsl:text> </xsl:text> >- <xsl:value-of select="$materialTypeLabel"/> >- </span> >- </xsl:if> >- >+ <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> >+ <xsl:text> </xsl:text> >+ <xsl:value-of select="$materialTypeLabel"/> >+ </span> >+ </xsl:if> >+ >+ <!--Bug 13381 Resource Medium from 245 strips [] and / from string--> >+ <xsl:if test="marc:datafield[@tag=245][marc:subfield[@code='h']]"> >+ <span class="results_summary type"><span class="label">Medium: </span> >+ <xsl:variable name="str"> >+ <xsl:for-each select="marc:datafield[@tag=245]"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">h</xsl:with-param> >+ </xsl:call-template> >+ </xsl:for-each> >+ </xsl:variable> >+ <xsl:value-of select="translate($str,'[]/',' ')"/> >+ </span> >+ </xsl:if> > > <!--Series: Alternate Graphic Representation (MARC 880) --> > <xsl:if test="$display880"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index af9ac00..26303f0 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 $ --> >+<!-- Edited: Bug 13381 [ENH] XSLT enhancements sponsored by bywater solutions 2014/12/29 WS wsalesky@gmail.com --> > <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> > <xsl:stylesheet version="1.0" > xmlns:marc="http://www.loc.gov/MARC21/slim" >@@ -127,22 +128,26 @@ > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> >- <xsl:if test="marc:subfield[@code='h']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">h</xsl:with-param> >- </xsl:call-template> >- </xsl:if> > <xsl:if test="marc:subfield[@code='b']"> > <xsl:text> </xsl:text> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">b</xsl:with-param> > </xsl:call-template> > </xsl:if> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">fgknps</xsl:with-param> >- </xsl:call-template> >+ <xsl:text> </xsl:text> >+ <!--Bug 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('fghknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- Span class around subfield h so it can be suppressed via css --> >+ <span class="title-medium"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:apply-templates/> >+ <xsl:text> </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> > </xsl:for-each> > </h1> > </xsl:if> >@@ -170,16 +175,30 @@ > </h5> > </xsl:when> > </xsl:choose> >- >- <xsl:if test="$DisplayOPACiconsXSLT!='0'"> >- <xsl:if test="$materialTypeCode!=''"> >- <span class="results_summary type"><span class="label">Material type: </span> >- <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element> >- <xsl:value-of select="$materialTypeLabel"/> >- </span> >+ >+ <xsl:if test="$DisplayOPACiconsXSLT!='0'"> >+ <xsl:if test="$materialTypeCode!=''"> >+ <span class="results_summary type"><span class="label">Material type: </span> >+ <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element> >+ <xsl:value-of select="$materialTypeLabel"/> >+ </span> >+ </xsl:if> > </xsl:if> >- </xsl:if> >- >+ >+ <!--Bug 13381 Resource Medium from 245 strips [] and / from string--> >+ <xsl:if test="marc:datafield[@tag=245][marc:subfield[@code='h']]"> >+ <span class="results_summary type"><span class="label">Medium: </span> >+ <xsl:variable name="str"> >+ <xsl:for-each select="marc:datafield[@tag=245]"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">h</xsl:with-param> >+ </xsl:call-template> >+ </xsl:for-each> >+ </xsl:variable> >+ <xsl:value-of select="translate($str,'[]/',' ')"/> >+ </span> >+ </xsl:if> >+ > <!--Series: Alternate Graphic Representation (MARC 880) --> > <xsl:if test="$display880"> > <xsl:call-template name="m880Select"> >-- >1.7.2.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 13381
:
34464
|
34996
|
34997
|
36783
|
37067
|
37068
|
37069
|
37070
|
37228
|
37982