pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
298 stars 443 forks source link

[OMP] Update Onix schema version in Onix Export plugin #10086

Closed kaitlinnewson closed 1 week ago

kaitlinnewson commented 1 month ago

Currently we're using 3.0.1. The latest supported versions are 3.0.8 and 3.1.1. This is required for https://github.com/pkp/pkp-lib/issues/9925.

What application are you using? OMP 3.3/3.4/main

asmecher commented 1 month ago

I should've posted this comment here :)

I would support bumping to the latest 3.0.x -- that's 3.0.8, I think. Going to 3.1 would mean a bit more consultation, but 3.0.8 should be backwards-compatible with 3.0.1.

kaitlinnewson commented 3 weeks ago

Due to the issue in https://github.com/pkp/pkp-lib/issues/10173 (which I found when trying to go to 3.0.8), I'm planning to upgrade to 3.0.2 to get some of the changes we need in that version without having to untangle some bigger problems.

kaitlinnewson commented 2 weeks ago

PRs for review, and will be forward-ported once approved:

@bozana would you be able to review?

This PR updates the Onix schema files for the export plugin to version 3.0.2 - this is not the latest version, but adds fields needed to work on other enhancements to the export. This PR doesn't update Onix schema files in other parts of OMP.

I've done work to reduce validation errors in the export, but there are still some edge cases where export validation can fail if tax data is included. Users will be able to use the validation checkbox in these cases (#10132) until we add the needed tax fields later (#10105).

The logic for the <Territory> nodes was adapted from this documentation (page 3).

bozana commented 2 weeks ago

@kaitlinnewson, when do we then plan to/when could we update to 3.0.8?

What do you mean with "This PR doesn't update Onix schema files in other parts of OMP." ? What does it mean for us?

Where did you find the 3.0.2 schemas?

Thanks a lot!

bozana commented 2 weeks ago

Hi @kaitlinnewson, the PR looks good to me. I will wait for the answers above -- to understand it all better -- then we can merge... Thanks a lot!

kaitlinnewson commented 2 weeks ago

@bozana

The main reason for this update was to get the changes needed to work on https://github.com/pkp/pkp-lib/issues/9925. So far it seems that we can do these upgrades as-needed (e.g. if there are new tags we need to export), unless there are community members who are requesting newer versions.

As I've been working with the Onix files I noticed we have several copies of them in OMP - for example, in omp-main:

$ find . -name 'ONIX_BookProduct_CodeLists.xsd'
./locale/it/ONIX_BookProduct_CodeLists.xsd
./locale/ca/ONIX_BookProduct_CodeLists.xsd
./locale/es/ONIX_BookProduct_CodeLists.xsd
./locale/en/ONIX_BookProduct_CodeLists.xsd
./plugins/importexport/native/ONIX_BookProduct_CodeLists.xsd
./plugins/importexport/onix30/ONIX_BookProduct_CodeLists.xsd

I haven't looked into how they are used, but I'm assuming these are used to populate some of the metadata fields which are using Onix codelists, such as the publication format metadata. Perhaps we should update these separately if we want the versions to be consistent.

The schema files are provided by EDItEUR on their website. Each release has an issue number, and I got these from the Issue 25 schema files zip in order to have version 3.0.2.

bozana commented 2 weeks ago

I would like to double check those other places to see if we would need to upgrade them as well... I would think that they should be the same -- from the first glance they all look to be the same version...

bozana commented 2 weeks ago

Hmmm... I see those used in the native importexport plugin are different... So maybe we can let all plugins handle their own ONIX versions appropriately...

bozana commented 2 weeks ago

@kaitlinnewson, I merged the PR for stable-3_4_0. Could you port it to stable-3_4_0 and main?

kaitlinnewson commented 1 week ago

@bozana I have forward-ported and updated the list above. I created an additional PR to 3_3_0 as I noticed an unrelated validation issue in my testing of the other branches that is now fixed in all PRs for this issue.

bozana commented 1 week ago

All merged, thus closing...