Bugzilla – Attachment 161518 Details for
Bug 30554
Use XSLT in authority search cataloguing plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30554: Embelished MARC21 XSLT example
Bug-30554-Embelished-MARC21-XSLT-example.patch (text/plain), 7.36 KB, created by
Martin Renvoize (ashimema)
on 2024-01-26 12:45:35 UTC
(
hide
)
Description:
Bug 30554: Embelished MARC21 XSLT example
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-01-26 12:45:35 UTC
Size:
7.36 KB
patch
obsolete
>From 8add8018602d675af6b2d52edaf9ea735ec2ecbd Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 26 Jan 2024 12:44:21 +0000 >Subject: [PATCH] Bug 30554: Embelished MARC21 XSLT example > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/xslt/MARC21authResults.xsl | 145 ++++++++++++++++++ > 1 file changed, 145 insertions(+) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21authResults.xsl > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21authResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21authResults.xsl >new file mode 100644 >index 00000000000..0ebd038fb7c >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21authResults.xsl >@@ -0,0 +1,145 @@ >+<?xml version='1.0' encoding="UTF-8"?> >+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> >+ <xsl:output omit-xml-declaration="yes"/> >+ >+ <xsl:template match="marc:record"> >+ <xsl:variable name="authid" select="marc:controlfield[@tag='001']" /> >+ <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/> >+ >+ <xsl:element name="div"> >+ <xsl:attribute name="class"> >+ <xsl:text>authority-summary</xsl:text> >+ </xsl:attribute> >+ >+ <!-- *********** Personal Name 100 ********* --> >+ <xsl:if test="marc:datafield[@tag='100']"> >+ <xsl:element name="span"> >+ <xsl:attribute name="class"> >+ <xsl:text>authorizedheading</xsl:text> >+ </xsl:attribute> >+ <a> >+ <xsl:attribute name="data-authid"><xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:value-of select="marc:datafield[@tag='100']/marc:subfield[@code='a']"/> >+ </a> >+ </xsl:element> >+ <ul> >+ <xsl:for-each select="marc:datafield[@tag=400]"> >+ <li class="heading"> >+ <xsl:if test="marc:subfield[@code='a']"> <xsl:value-of select="marc:subfield[@code='a']"/> </xsl:if> >+ </li> >+ </xsl:for-each> >+ </ul> >+ </xsl:if> >+ <!-- *** End Personal Name **--> >+ >+ <!-- *********** Corporate Name 110 ********* --> >+ <xsl:if test="marc:datafield[@tag='110']"> >+ <xsl:element name="span"> >+ <xsl:attribute name="class"> >+ <xsl:text>authorizedheading</xsl:text> >+ </xsl:attribute> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:value-of select="marc:datafield[@tag='110']/marc:subfield[@code='a']"/> >+ </a> >+ </xsl:element> >+ >+ <ul> >+ <xsl:for-each select="marc:datafield[@tag=400]"> >+ <li class="heading"> >+ <xsl:if test="marc:subfield[@code='a']"> <xsl:value-of select="marc:subfield[@code='a']"/> </xsl:if> >+ </li> >+ </xsl:for-each> >+ </ul> >+ </xsl:if> >+ <!-- *** End Corporate Name **--> >+ >+ <!-- *********** Meeting Name 111 ********* --> >+ <xsl:if test="marc:datafield[@tag='111']"> >+ <xsl:element name="span"> >+ <xsl:attribute name="class"> >+ <xsl:text>authorizedheading</xsl:text> >+ </xsl:attribute> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:value-of select="marc:datafield[@tag='111']/marc:subfield[@code='a']"/> >+ </a> >+ </xsl:element> >+ >+ <ul> >+ <xsl:for-each select="marc:datafield[@tag=400]"> >+ <li class="heading"> >+ <xsl:if test="marc:subfield[@code='a']"> <xsl:value-of select="marc:subfield[@code='a']"/> </xsl:if> >+ </li> >+ </xsl:for-each> >+ </ul> >+ </xsl:if> >+ <!-- *** End Meeting Name **--> >+ >+ <!-- *********** Uniform Title 130 ********* --> >+ <xsl:if test="marc:datafield[@tag='130']"> >+ <xsl:element name="span"> >+ <xsl:attribute name="class"> >+ <xsl:text>authorizedheading</xsl:text> >+ </xsl:attribute> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:value-of select="marc:datafield[@tag='130']/marc:subfield[@code='a']"/> >+ </a> >+ </xsl:element> >+ <ul> >+ <xsl:for-each select="marc:datafield[@tag=400]"> >+ <li class="heading"> >+ <xsl:if test="marc:subfield[@code='a']"> <xsl:value-of select="marc:subfield[@code='a']"/> </xsl:if> >+ </li> >+ </xsl:for-each> >+ </ul> >+ </xsl:if> >+ <!-- *** End Uniform Title **--> >+ >+ <!-- *********** Topical Term 150 ********* --> >+ <xsl:if test="marc:datafield[@tag='150']"> >+ <xsl:element name="span"> >+ <xsl:attribute name="class"> >+ <xsl:text>authorizedheading</xsl:text> >+ </xsl:attribute> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:value-of select="marc:datafield[@tag='150']/marc:subfield[@code='a']"/> >+ </a> >+ </xsl:element> >+ <ul> >+ <xsl:for-each select="marc:datafield[@tag=400]"> >+ <li class="heading"> >+ <xsl:if test="marc:subfield[@code='a']"> <xsl:value-of select="marc:subfield[@code='a']"/> </xsl:if> >+ </li> >+ </xsl:for-each> >+ </ul> >+ </xsl:if> >+ <!-- *** End Topic Term **--> >+ >+ <!-- *********** Geographic Name 151 ********* --> >+ <xsl:if test="marc:datafield[@tag='151']"> >+ <xsl:element name="span"> >+ <xsl:attribute name="class"> >+ <xsl:text>authorizedheading</xsl:text> >+ </xsl:attribute> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute> >+ <xsl:value-of select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/> >+ </a> >+ </xsl:element> >+ <ul> >+ <xsl:for-each select="marc:datafield[@tag=400]"> >+ <li class="heading"> >+ <xsl:if test="marc:subfield[@code='a']"> <xsl:value-of select="marc:subfield[@code='a']"/> </xsl:if> >+ </li> >+ </xsl:for-each> >+ </ul> >+ </xsl:if> >+ <!-- *** End Geographic Name **--> >+ >+ </xsl:element> >+ </xsl:template> >+</xsl:stylesheet> >-- >2.43.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 30554
:
133359
|
156824
|
156825
|
156826
|
157293
|
157294
|
157295
|
161517
|
161518
|
161545