Hello all, After the upgrade to 3.22, OAI-PMH response is now using oai_dc:collection instead of oai_dc:dc. NOTE: You might need to access the corresponding staff interface for the links below, because the database may have been reseted and OAI repository might be disabled. *This is an example from online demo version 3.16 (Haven't got any handy 3.20):* http://library.software.coop/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc *This is from online demo 3.22:* http://koha.adminkuhn.ch:8000/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc Can someone else confirm this? Is this intentional? I have found nothing regarding this in the release notes. Thanks, Pedro Amorim
Hi Pedro, Il 05/04/2016 14:17, Pedro Amorim ha scritto:
After the upgrade to 3.22, OAI-PMH response is now using oai_dc:collection instead of oai_dc:dc.
in fact your example of 3.22 is a demo that use default setup. But your example of 3.16 is not a standard setup, it is a personalization. If you go to code of 3.16.x for intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/intranet... you can say that dublin core metadata are inside <oai_dc:dcCollection> ... </oai_dc:dcCollection> So if you prefert the solution of 3.16 in library.software.coop, you need only to change your version of /xslt/MARC21slim2OAIDC.xsl file Bye Zeno Tajoli -- Zeno Tajoli / SVILUPPO PRODOTTI/ - Automazione Biblioteche Email: z.tajoli@cineca.it Fax: 051/6132198 *CINECA* Consorzio Interuniversitario - Sede operativa di Segrate (MI)
Keep in mind that in the OAI extended mode, you can set your custom XSLT (which could of course be derived from the original) to suit your needs. Regards 2016-04-05 11:20 GMT-03:00 Tajoli Zeno <z.tajoli@cineca.it>:
Hi Pedro,
Il 05/04/2016 14:17, Pedro Amorim ha scritto:
After the upgrade to 3.22, OAI-PMH response is now using oai_dc:collection
instead of oai_dc:dc.
in fact your example of 3.22 is a demo that use default setup. But your example of 3.16 is not a standard setup, it is a personalization.
If you go to code of 3.16.x for intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/intranet...
you can say that dublin core metadata are inside <oai_dc:dcCollection> ... </oai_dc:dcCollection>
So if you prefert the solution of 3.16 in library.software.coop, you need only to change your version of /xslt/MARC21slim2OAIDC.xsl file
Bye Zeno Tajoli
-- Zeno Tajoli / SVILUPPO PRODOTTI/ - Automazione Biblioteche Email: z.tajoli@cineca.it Fax: 051/6132198 *CINECA* Consorzio Interuniversitario - Sede operativa di Segrate (MI)
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F
Hello Tajoli and thank you for your reply, However, I'm not convinced. Here are my arguments: 1) This is another demo site running 3.20: https://opac-kohademo.esilibrary.com/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc It shows oai:dc as expected. I doubt that both this 3.20 and the 3.16 provided before have the same customization. 2) The Koha installation I'm using has the same exact customizations (templates and config files) in 3.22 it had in 3.20 and this behaviour only became apparent in 3.22. 3) If we analyse the code from UNIMARCslim2OAIDC.xsl <https://github.com/Koha-Community/Koha/blob/da21ad065939d0789bb90d8fd6d088b781688aa3/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl> we can see at the beginning of the file: <xsl:if test="marc:collection"> <oai_dc:dcCollection xsi:schemaLocation=" http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> <xsl:for-each select="marc:collection"> <xsl:for-each select="marc:record"> <oai_dc:dc> <xsl:apply-templates select="."/> </oai_dc:dc> </xsl:for-each> </xsl:for-each> </oai_dc:dcCollection> </xsl:if> <xsl:if test="marc:record"> <oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> <xsl:apply-templates/> </oai_dc:dc> </xsl:if> Leads to me believe the file is the same but is now using the 'marc:collection' condition instead of the 'marc:record' condition. 2016-04-05 14:20 GMT+00:00 Tajoli Zeno <z.tajoli@cineca.it>:
Hi Pedro,
Il 05/04/2016 14:17, Pedro Amorim ha scritto:
After the upgrade to 3.22, OAI-PMH response is now using oai_dc:collection
instead of oai_dc:dc.
in fact your example of 3.22 is a demo that use default setup. But your example of 3.16 is not a standard setup, it is a personalization.
If you go to code of 3.16.x for intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/intranet...
you can say that dublin core metadata are inside <oai_dc:dcCollection> ... </oai_dc:dcCollection>
So if you prefert the solution of 3.16 in library.software.coop, you need only to change your version of /xslt/MARC21slim2OAIDC.xsl file
Bye Zeno Tajoli
-- Zeno Tajoli / SVILUPPO PRODOTTI/ - Automazione Biblioteche Email: z.tajoli@cineca.it Fax: 051/6132198 *CINECA* Consorzio Interuniversitario - Sede operativa di Segrate (MI) _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Hi, On Tue, Apr 5, 2016 at 10:37 AM, Pedro Amorim <pjamorim91@gmail.com> wrote:
Leads to me believe the file is the same but is now using the 'marc:collection' condition instead of the 'marc:record' condition.
I believe you are correct. As a result of the change made in bug 12252, the OAI code now uses GetMarcBiblio() followed by MARC::File::XML->as_xml() to fetch each MARCXML document, rather than querying the biblioitems.marcxml column directly. As a consequence, the XML document that's returned is now wrapped in a marc:collection element. The diff I've pasted below my signature restores the previous behavior [1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12252 Regards, Galen -- Galen Charlton Infrastructure and Added Services Manager Equinox Software, Inc. / Open Your Library email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm index 374ce29..f4f30f6 100644 --- a/Koha/OAI/Server/Repository.pm +++ b/Koha/OAI/Server/Repository.pm @@ -151,7 +151,7 @@ sub get_biblio_marcxml { $with_items = $conf->{format}->{$format}->{include_items}; } my $record = GetMarcBiblio($biblionumber, $with_items, 1); - $record ? $record->as_xml() : undef; + $record ? $record->as_xml_record() : undef; }
Hello Galen, Thank you very much! Pedro Amorim 2016-04-05 16:31 GMT+00:00 Galen Charlton <gmc@esilibrary.com>:
Hi,
On Tue, Apr 5, 2016 at 10:37 AM, Pedro Amorim <pjamorim91@gmail.com> wrote:
Leads to me believe the file is the same but is now using the 'marc:collection' condition instead of the 'marc:record' condition.
I believe you are correct. As a result of the change made in bug 12252, the OAI code now uses GetMarcBiblio() followed by MARC::File::XML->as_xml() to fetch each MARCXML document, rather than querying the biblioitems.marcxml column directly. As a consequence, the XML document that's returned is now wrapped in a marc:collection element.
The diff I've pasted below my signature restores the previous behavior
[1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12252
Regards,
Galen -- Galen Charlton Infrastructure and Added Services Manager Equinox Software, Inc. / Open Your Library email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org
diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm index 374ce29..f4f30f6 100644 --- a/Koha/OAI/Server/Repository.pm +++ b/Koha/OAI/Server/Repository.pm @@ -151,7 +151,7 @@ sub get_biblio_marcxml { $with_items = $conf->{format}->{$format}->{include_items}; } my $record = GetMarcBiblio($biblionumber, $with_items, 1); - $record ? $record->as_xml() : undef; + $record ? $record->as_xml_record() : undef; }
Guys, is this a bug that should be filled/fixed? 2016-04-05 13:31 GMT-03:00 Galen Charlton <gmc@esilibrary.com>:
Hi,
On Tue, Apr 5, 2016 at 10:37 AM, Pedro Amorim <pjamorim91@gmail.com> wrote:
Leads to me believe the file is the same but is now using the 'marc:collection' condition instead of the 'marc:record' condition.
I believe you are correct. As a result of the change made in bug 12252, the OAI code now uses GetMarcBiblio() followed by MARC::File::XML->as_xml() to fetch each MARCXML document, rather than querying the biblioitems.marcxml column directly. As a consequence, the XML document that's returned is now wrapped in a marc:collection element.
The diff I've pasted below my signature restores the previous behavior
[1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12252
Regards,
Galen -- Galen Charlton Infrastructure and Added Services Manager Equinox Software, Inc. / Open Your Library email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org
diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm index 374ce29..f4f30f6 100644 --- a/Koha/OAI/Server/Repository.pm +++ b/Koha/OAI/Server/Repository.pm @@ -151,7 +151,7 @@ sub get_biblio_marcxml { $with_items = $conf->{format}->{$format}->{include_items}; } my $record = GetMarcBiblio($biblionumber, $with_items, 1); - $record ? $record->as_xml() : undef; + $record ? $record->as_xml_record() : undef; } _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F
participants (4)
-
Galen Charlton -
Pedro Amorim -
Tajoli Zeno -
Tomas Cohen Arazi