Bugzilla – Attachment 33177 Details for
Bug 6681
Provide a way for removing authority links and holdings on Z39.50 record import
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6681: introduce XSLT scripts to remove items and links
Bug-6681-introduce-XSLT-scripts-to-remove-items-an.patch (text/plain), 5.11 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-11-03 19:01:31 UTC
(
hide
)
Description:
Bug 6681: introduce XSLT scripts to remove items and links
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-11-03 19:01:31 UTC
Size:
5.11 KB
patch
obsolete
>From de1db2a91381183942f8aad46e89f6b09ffc5e2e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 3 Nov 2014 15:44:36 -0300 >Subject: [PATCH] Bug 6681: introduce XSLT scripts to remove items and links > >This patch adds the following sample files: > >- Del952.xsl >- Del995.xsl >- Del9LinksExcept952.xsl >- Del9LinksExcept995.xsl > >Thay can be used on the new SRU/Z39.50 XSLT processing feature. At the same >time they can be used to solve this bug. > >To test: >- Have an SRU/Z39.50 target configured >- Have a search that returns at least a record with the following > properties: > * It contains $9 links > * It contains items (952 or 995 fields in MARC21/NORMARC and UNIMARC respectively). > >MARC21/NORMARC test: >- Do a Z39.50/SRU cataloguing search that retrieves the desired record >- Verify it includes $9 and 952 field(s) by clicking on the MARC link >- Edit your Z39.50 target and add Del952.xsl to the "XSLT File(s) for transforming results:" field >- Re-run the search >=> SUCCESS: the MARC view of the imported record doesn't contain the 952 field >- Edit your Z39.50 target and add Del9LinksExcept952.xsl to the "XSLT File(s) for transforming results:" field >- Re-run the search >=> SUCCESS: the MARC view contains the 952 field (including the $9 subfield), and > all other $9 subfields have been removed >- Edit your Z39.50 target and add > Del952.xsl, Del9LinksExcept952.xsl > to the "XSLT File(s) for transforming results:" field (both, comma separated) >- Re-run the search >=> SUCCESS: the MARC view doesn't contain $9 subfields nor items. > >- Repeat for UNIMARC, replacing 952 for 995. >- Sign off :-D > >Regards >Tomas > >Sponsored-by: Universidad Nacional de Cordoba >--- > koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl | 17 +++++++++++++++++ > koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl | 18 ++++++++++++++++++ > .../intranet-tmpl/prog/en/xslt/Del9LinksExcept952.xsl | 16 ++++++++++++++++ > .../intranet-tmpl/prog/en/xslt/Del9LinksExcept995.xsl | 16 ++++++++++++++++ > 4 files changed, 67 insertions(+) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept952.xsl > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept995.xsl > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl >new file mode 100644 >index 0000000..cb976d3 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl >@@ -0,0 +1,17 @@ >+<xsl:stylesheet >+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:marc="http://www.loc.gov/MARC21/slim" >+ version="1.0"> >+ >+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/> >+ <xsl:strip-space elements="*"/> >+ >+ <xsl:template match="marc:datafield[@tag=952]"/> >+ >+ <xsl:template match="@* | node()"> >+ <xsl:copy> >+ <xsl:apply-templates select="@* | node()"/> >+ </xsl:copy> >+ </xsl:template> >+ >+</xsl:stylesheet> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl >new file mode 100644 >index 0000000..d699161 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl >@@ -0,0 +1,18 @@ >+<xsl:stylesheet >+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:marc="http://www.loc.gov/MARC21/slim" >+ version="1.0"> >+ >+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/> >+ <xsl:strip-space elements="*"/> >+ >+ <xsl:template match="marc:datafield[@tag=995]"/> >+ >+ <xsl:template match="@* | node()"> >+ <xsl:copy> >+ <xsl:apply-templates select="@* | node()"/> >+ </xsl:copy> >+ </xsl:template> >+ >+</xsl:stylesheet> >+ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept952.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept952.xsl >new file mode 100644 >index 0000000..2d650ec >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept952.xsl >@@ -0,0 +1,16 @@ >+<xsl:stylesheet >+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:marc="http://www.loc.gov/MARC21/slim" >+ version="1.0"> >+ >+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/> >+ <xsl:strip-space elements="*"/> >+ >+ <xsl:template match="@* | node()"> >+ <xsl:copy> >+ <xsl:apply-templates select="@* | node()"/> >+ </xsl:copy> >+ </xsl:template> >+ >+ <xsl:template match="marc:datafield[@tag!=952]/marc:subfield[@code=9]"/> >+</xsl:stylesheet> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept995.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept995.xsl >new file mode 100644 >index 0000000..20a0e4c >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept995.xsl >@@ -0,0 +1,16 @@ >+<xsl:stylesheet >+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:marc="http://www.loc.gov/MARC21/slim" >+ version="1.0"> >+ >+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/> >+ <xsl:strip-space elements="*"/> >+ >+ <xsl:template match="@* | node()"> >+ <xsl:copy> >+ <xsl:apply-templates select="@* | node()"/> >+ </xsl:copy> >+ </xsl:template> >+ >+ <xsl:template match="marc:datafield[@tag!=995]/marc:subfield[@code=9]"/> >+</xsl:stylesheet> >-- >1.9.1
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 6681
:
4892
|
6929
|
7115
|
7117
|
30795
|
31181
|
33177
|
33407
|
33410
|
33425
|
33427
|
33540
|
33541