Bug 6681: introduce XSLT scripts to remove items and links
authorTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 3 Nov 2014 18:44:36 +0000 (15:44 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 14 Nov 2014 12:31:36 +0000 (09:31 -0300)
commit0be1dce1f7142aae8a87133a90a22659a75143bc
tree2219615354a15ea6d66e13ef03b3b0020bec28c7
parentdd385fc2e9e6a2381ff0052582df6f072193cdb2
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
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested under MARC21. Works fine. (Additionally verified 995 with xsltproc.)
As noted on Bugzilla, we could still improve documentation but imo no need
to block these example transformations.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
I can't resist to put my own signature on this patch, confirming it works as
described with z39.50 Unimarc targets.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept952.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept995.xsl [new file with mode: 0644]