Created attachment 69530 [details] [review] Bug 19353: Add test
Created attachment 69531 [details] [review] Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider Test plan: 0) apply the patchset 1) setup oai server with oaiconf file defining xsl_file for metadata format marcxml or marc21 2) play with your oai and confirm that records are transformed as expected 3) prove t/db_dependent/OAI/Server.t
*** Bug 20129 has been marked as a duplicate of this bug. ***
Created attachment 72553 [details] [review] Bug 19353: Add test
Created attachment 72554 [details] [review] Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider Test plan: 0) apply the patchset 1) setup oai server with oaiconf file defining xsl_file for metadata format marcxml or marc21 2) play with your oai and confirm that records are transformed as expected 3) prove t/db_dependent/OAI/Server.t
Created attachment 76331 [details] [review] Bug 19353: Add test
Created attachment 76332 [details] [review] Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider Test plan: 0) apply the patchset 1) setup oai server with oaiconf file defining xsl_file for metadata format marcxml or marc21 2) play with your oai and confirm that records are transformed as expected 3) prove t/db_dependent/OAI/Server.t
Just rebased on master
Patch tested with a sandbox, by Martin 357astný <martin.stastny@teamlibrary.cz>
Created attachment 77469 [details] [review] Bug 19353: Add test Signed-off-by: Martin 357astný <martin.stastny@teamlibrary.cz>
Created attachment 77470 [details] [review] Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider Test plan: 0) apply the patchset 1) setup oai server with oaiconf file defining xsl_file for metadata format marcxml or marc21 2) play with your oai and confirm that records are transformed as expected 3) prove t/db_dependent/OAI/Server.t Signed-off-by: Martin 357astný <martin.stastny@teamlibrary.cz> Signed-off-by: Martin 357astný <martin.stastny@teamlibrary.cz>
@Martin Is your sign-off line ok like that? Please let us know in case you want to change it before this is pushed! Signed-off-by: Martin 357astný <martin.stastny@teamlibrary.cz> @Josef, can I ask for some more instructions on configuring the OAI server with specific files? A sample file would also be great for testing.
t/db_dependent/OAI/oaiconf.yaml references a file that exists only if koha is installed using the Debian packages. If this file is not present, tests fail. Also, tests fail if marcflavour == 'UNIMARC'. Please fix.
Created attachment 111005 [details] [review] Bug 19353: Add test Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz>
Created attachment 111006 [details] [review] Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider Test plan: 0) apply the patchset 1) setup oai server with oaiconf file defining xsl_file for metadata format marcxml or marc21 2) play with your oai and confirm that records are transformed as expected 3) prove t/db_dependent/OAI/Server.t Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz>
Created attachment 111007 [details] [review] Bug 19353: Use xslt from distribution, not packaged installed one
Created attachment 111009 [details] [review] Bug 19353: Fix tests on UNIMARC
(In reply to Julian Maurice from comment #13) > t/db_dependent/OAI/oaiconf.yaml references a file that exists only if koha > is installed using the Debian packages. If this file is not present, tests > fail. I fixed the path to xslt used oaiconf.yaml to not used the one from package install > Also, tests fail if marcflavour == 'UNIMARC'. > I fixed that. Please note there are still two failing tests on UNIMARC, but they are failing in master too... > Please fix. done ;)
(In reply to Katrin Fischer from comment #12) > @Josef, can I ask for some more instructions on configuring the OAI server > with specific files? A sample file would also be great for testing. Katrin, this is configuration we are using on production: https://gitlab.com/open-source-knihovna/KohaCZ/-/blob/master/etc/oaiconf.yaml https://gitlab.com/open-source-knihovna/KohaCZ/-/tree/master/etc/xslt I do recomend to try the marc21 metadata format with ModifyMarc.xslt https://gitlab.com/open-source-knihovna/KohaCZ/-/blob/master/etc/xslt/ModifyMARC.xsl It is relatively simple, other templates we are using are a bit more complex....
Created attachment 111524 [details] [review] Bug 19353: Add test Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111525 [details] [review] Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider Test plan: 0) apply the patchset 1) setup oai server with oaiconf file defining xsl_file for metadata format marcxml or marc21 2) play with your oai and confirm that records are transformed as expected 3) prove t/db_dependent/OAI/Server.t Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111526 [details] [review] Bug 19353: Use xslt from distribution, not packaged installed one Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111527 [details] [review] Bug 19353: Fix tests on UNIMARC Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
It was a bit of struggle to get the OAI to cooperate (thx to Joonas helping me out!), but I finally managed a proper test and this appears to be working just fine :)
(In reply to Katrin Fischer from comment #24) > It was a bit of struggle to get the OAI to cooperate (thx to Joonas helping > me out!), but I finally managed a proper test and this appears to be working > just fine :) Thanks Katrin!
Pushed to master for 20.11, thanks to everybody involved!
enhancement will not be backported to 20.05.x