Skip to content

[Port to dtq-dev-93] ELG crosswalk: fix records rejected by the ELG harvest - #1776

Open
milanmajchrak wants to merge 1 commit into
dtq-dev-93from
93/be-rest-checks
Open

milanmajchrak wants to merge 1 commit into
dtq-dev-93from
93/be-rest-checks

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

References

Ports this dtq-dev PR:

Description

The ELG crosswalk (elg.xsl) now gives valid ELG-SHARE output for the records the ELG harvest rejected: too long descriptions, wrong funding types, sizes that are not numbers and language codes ELG does not know. Same change as on dtq-dev.

Instructions for Reviewers

List of changes in this PR:

  • elg.xsl is the dtq-dev file after 1647. On dtq-dev-93 it was still the dtq-dev file before 1647, so this is the 1647 diff with no v9 changes.
  • ElgXslTest and its two fictional fixtures xoai-elg-corpus-test.xml, xoai-elg-tool-test.xml come from 1647. Only the comments changed: they no longer name real records.
  • AbstractXSLTest is the dtq-dev file. It registers a stub fn:getProperty and the real LogMissingFn and ShortestIdFn, which elg.xsl calls. The CCMM port PRs bring the same stub, so a conflict there resolves to this file.

How to test:

  • mvn -pl dspace-oai test -DskipUnitTests=false -Dtest=ElgXslTest,QDCXslTest,RioxxXslTest -Dsurefire.failIfNoSpecifiedTests=false. All 27 tests pass. With elg.xsl from dtq-dev-93, 20 of the 25 ElgXslTest tests fail.
  • After deploy run dspace oai import -c, then GetRecord with metadataPrefix=elg for an item with a description over 10,000 characters. The description ends with … and the record validates against ELG-SHARE.xsd.

Codex review (gpt-6.2-sol, high), 1 round: 3 findings, not changed in this PR because elg.xsl stays identical to dtq-dev. Better as a follow-up on dtq-dev:

  • a size like 1 234,567 with mixed separators becomes 1234567;
  • und; mis plus one language name is counted as two languages (bilingual);
  • a language-dependent tool with only a free-text language name is exported as language-independent.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

Same elg.xsl, ElgXslTest and fixtures as dtq-dev 6a7d68b. AbstractXSLTest
registers a stub getProperty and the logMissing and shortestIdFn functions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant