From 6da83232d242da58a3cee9ce50f11a50611e1f9b Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Mon, 15 Apr 2013 21:56:53 +0200 Subject: [PATCH] Bug 10058 - Fix unapi for NORMARC This patch uses a lot of MARC21 XSLT to transform NORMARC records to desired formats. Since NORMARC is mostly a subset of MARC21, I think this should give passable results. And better results than no unapi-support at all for NORMARC! To reproduce: - Make sure you have marcflavour = NORMARC - Visit /cgi-bin/koha/unapi in a browser - Observe the empty element To test: - Apply the patch - Visit /cgi-bin/koha/unapi in a browser - Observe the the list of formats in the element - Import the provided sample NORMARC record and make a note of its biblionumber - View the record at /cgi-bin/koha/unapi?id=koha:biblionumber:x&format=y where x = the biblionumber of the sample record and y = one of the formats marcxml, marcxml-full, mods, mods-full, mods3, mods3-full, oai_dc, rdfdc, rss2, rss2-full and srw_dc - Check that the transformed records make some kind of superficial sense Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- opac/unapi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/opac/unapi b/opac/unapi index 0f97eced35..6d8aec79ce 100755 --- a/opac/unapi +++ b/opac/unapi @@ -75,6 +75,19 @@ my $format_to_stylesheet_map = { 'rss2-full' => 'MARC21slim2RSS2.xsl', 'srw_dc' => 'MARC21slim2SRWDC.xsl', }, + 'NORMARC' => { + 'marcxml' => 'identity.xsl', + 'marcxml-full' => 'identity.xsl', + 'mods' => 'MARC21slim2MODS.xsl', + 'mods-full' => 'MARC21slim2MODS.xsl', + 'mods3' => 'MARC21slim2MODS3-1.xsl', + 'mods3-full' => 'MARC21slim2MODS3-1.xsl', + 'oai_dc' => 'MARC21slim2OAIDC.xsl', + 'rdfdc', => 'MARC21slim2RDFDC.xsl', + 'rss2' => 'MARC21slim2RSS2.xsl', + 'rss2-full' => 'MARC21slim2RSS2.xsl', + 'srw_dc' => 'MARC21slim2SRWDC.xsl', + }, 'UNIMARC' => { 'marcxml' => 'identity.xsl', 'marcxml-full' => 'identity.xsl', -- 2.39.5