Skip to content

DCAT / Update Licence EU Vocabulary #8865

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

streino
Copy link

@streino streino commented Jun 13, 2025

This is a preemptive PR that will be required on the next GeoNetwork License EU vocabulary upgrade (decided to go with vocabulary update on that PR).

Newer versions of the License EU vocabulary contain Concept elements with several exactMatch occurrences.

For instance :

<skos:Concept rdf:about="http://publications.europa.eu/resource/authority/licence/ETALAB_2_0"
             at:deprecated="false">
  ...
  <skos:exactMatch rdf:resource="https://spdx.org/licenses/etalab-2.0.html"/>
  <skos:exactMatch rdf:resource="https://www.etalab.gouv.fr/licence-ouverte-open-licence/"/>

The current XSLT raises the following error:

Traceback (most recent call last):
...
Error at char 108 in expression in xsl:variable/@select on line 158 column 113 of dcat-core-access-and-use.xsl:
  XPTY0004  A sequence of more than one item { ("https://spdx.org/lic ...
  CC-BY-NC-SA-1.0.html", "http://creativecommo ... censes/by-nc-sa/1.0/") } is not allowed
  as the first argument of fn:matches(). Found while atomizing the first operand of '!=' in
  {$euDcatLicense} on line 160

Tested with licences-skos.rdf version 20241211-0 (latest so far).

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@CLAassistant
Copy link

CLAassistant commented Jun 13, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@fxprunayre fxprunayre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fxprunayre fxprunayre added this to the 4.4.9 milestone Jun 16, 2025
@fxprunayre fxprunayre changed the title Fix XSLT error when license Concept has several exactMatch elements DCAT / Fix XSLT error when license Concept has several exactMatch elements Jun 16, 2025
@streino
Copy link
Author

streino commented Jun 16, 2025

Looks good but should we also update the vocabulary to the latest version https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/dcat/vocabularies/licences-skos.rdf ?

Sure!
Are there tests I need to run to validate that upgrade, or do I just push the new licences-skos.rdf version?
Also, should I do the upgrade here or in another PR?

@fxprunayre
Copy link
Member

Are there tests I need to run to validate that upgrade,

Formatter tests for DCAT are defined here https://github.com/geonetwork/core-geonetwork/blob/main/services/src/test/java/org/fao/geonet/api/records/formatters/FormatterApiTest.java#L89-L97

Also, should I do the upgrade here or in another PR?

Sounds fine to update the vocabulary here.

@streino
Copy link
Author

streino commented Jun 16, 2025

@streino streino changed the title DCAT / Fix XSLT error when license Concept has several exactMatch elements DCAT / Update Licence EU Vocabulary Jun 16, 2025
@streino streino requested a review from fxprunayre June 17, 2025 09:10
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.

3 participants