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 <formats></formats> element To test: - Apply the patch - Visit /cgi-bin/koha/unapi in a browser - Observe the the list of formats in the <formats></formats> 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 <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
8101d83af6
commit
c5e2c06a79
13
opac/unapi
13
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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue