Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OMP] Update the Onix schema version #10365

Closed
kaitlinnewson opened this issue Sep 4, 2024 · 9 comments
Closed

[OMP] Update the Onix schema version #10365

kaitlinnewson opened this issue Sep 4, 2024 · 9 comments
Assignees
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks.
Milestone

Comments

@kaitlinnewson
Copy link
Member

Describe the bug
In #10086 the version of the Onix schema used was updated for Onix exports. We should update the schema in other locations in OMP so they are consistent with each other, and we are using more up-to-date codelists.

Onix maintains backwards compatibilty in the code values, so there shouldn't be a need to handle values that are no longer part of the Onix schema. From the documentation:

To maintain backwards compatibility in respect of code values as well as message formats, code values, once published, are never deleted or substantively redefined. They may, however, be marked as ‘deprecated’, and replaced by new values; and their definitions may sometimes be revised to clarify the intended meaning or usage.

What application are you using?
OMP (all versions)

@kaitlinnewson kaitlinnewson added the Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. label Sep 4, 2024
@bozana
Copy link
Collaborator

bozana commented Sep 5, 2024

We can then try to update to ONIX 3.1 (Issue 66).

We can use these translations:

The new files are in different format, so we will probably need to adapt ONIXParserDOMHandler. If we need the XML file validation we can use https://www.editeur.org/files/ONIX%20for%20books%20-%20code%20lists/ONIX_BookProduct_Codelist_Structure.xsd.

We would look how to best provide some attribution to EDItEUR and the organizations (in bold above) who did the translation work, together with a link to the EDItEUR license DOI:10.4400/nwgj.

@kaitlinnewson kaitlinnewson self-assigned this Oct 1, 2024
@kaitlinnewson kaitlinnewson added this to the 3.5.0 LTS milestone Oct 7, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Oct 11, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 11, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 11, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Oct 16, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 16, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Oct 17, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 17, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 18, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Oct 18, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 22, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 22, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 22, 2024
kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Oct 22, 2024
@kaitlinnewson kaitlinnewson added Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks. and removed Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. labels Oct 22, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 22, 2024
@kaitlinnewson
Copy link
Member Author

PRs ready for a first review @bozana:

A few notes/summary of the changes:

  • We are now using the XML format instead of XSD for the CodeList files, and I've included all translations available in XML format (Issue 66)
  • Users will now see values that have been "Discontinued" (Deprecated) in the lists in ONIX. These have been kept in case a previously created publication was using one of these values, but appear at the bottom of the list and are labelled to discourage users from selecting them.
  • The two lists that have been removed and replaced are List 7 (product forms, now using List 150), and List 95 (weight units, now using List 50).
  • The CodeList files in the Native Import/Export plugin and the ONIX Export plugin have not been updated, and will be done in separate PRs.

@bozana
Copy link
Collaborator

bozana commented Oct 23, 2024

Hi @kaitlinnewson, I took a look into the PRs and the changes look good :-)
I would also test it tomorrow... will then let you know...
Great work! Thanks a lot!

@bozana
Copy link
Collaborator

bozana commented Oct 23, 2024

I see we are validation all xml files in our github action, s. https://github.com/pkp/pkp-github-actions/blob/main/.github/actions/validate-xml.sh.
Maybe we can proceed with the ONIX XML files like this:

  • we would exclude them in tools/xmllint-exclusions.txt
  • then we would add the following line to that github action:
if (application == 'OMP') then
/usr/bin/xmllint --noout --valid 'find $REPOSITORY_DIR -name ONIX_BookProduct_Codelists.xml' --schema https://www.editeur.org/files/ONIX%20for%20books%20-%20code%20lists/ONIX_BookProduct_Codelist_Structure.xsd

I have just asked Dulip what would he suggest... lets see then...

@kaitlinnewson
Copy link
Member Author

For the second suggestion, there's a chance we could run into test failures if the hosted XSD is changed for a new version of ONIX that we aren't yet using - but I can't find a version online that is "locked" to our Issue (66).

@bozana
Copy link
Collaborator

bozana commented Oct 24, 2024

I asked Alec if we need to validate these files every time tests are run -- it seems to me that this is not really necessary because they will probably never change and are actually the originals... but lets see what he says...
For now I think we can exclude them from validation, so we see if other tests pass...

@bozana
Copy link
Collaborator

bozana commented Oct 24, 2024

Hi @kaitlinnewson, I have tested it roughly and find just one problem, s. the comment in the OMP PR.
Thanks!

kaitlinnewson added a commit to kaitlinnewson/pkp-lib that referenced this issue Oct 24, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 24, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 24, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 24, 2024
kaitlinnewson added a commit to kaitlinnewson/omp that referenced this issue Oct 24, 2024
@kaitlinnewson
Copy link
Member Author

Hi @bozana, I've fixed that issue and added the files to the xml lint exclusions for the tests. Should be ready to go!

bozana added a commit that referenced this issue Oct 24, 2024
bozana added a commit to pkp/omp that referenced this issue Oct 24, 2024
@bozana
Copy link
Collaborator

bozana commented Oct 24, 2024

All merged, thus closing...
Thanks a lot @kaitlinnewson!

@bozana bozana closed this as completed Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks.
Projects
None yet
Development

No branches or pull requests

3 participants