Skip to content

Conversation

cmangeat
Copy link
Contributor

@cmangeat cmangeat commented Aug 20, 2025

iso19115-3.2018.che being based on iso19115-3.2018, encountered failures when working with dcat and iso19115-3.2018.che, wanted to share.

link to iso18115-3.2018.che sibling tests can be found in commits description.

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

could be the case with iso19115-3.2018.
tests can be found here: metadata101/iso19115-3.2018.che@2292b22
which do not carry 'cit:name', there is no group by loop.
could be the case with iso19115-3.2018.
tests can be found here: metadata101/iso19115-3.2018.che@0ea2205.
@cmangeat cmangeat marked this pull request as draft August 21, 2025 08:24
@cmangeat cmangeat closed this Aug 21, 2025
@cmangeat cmangeat reopened this Aug 21, 2025
@cmangeat cmangeat force-pushed the schema_fixes branch 2 times, most recently from e808840 to 90669d3 Compare August 21, 2025 13:15
@cmangeat cmangeat marked this pull request as ready for review August 21, 2025 13:41
@cmangeat cmangeat marked this pull request as draft August 21, 2025 14:46
@cmangeat cmangeat marked this pull request as ready for review August 21, 2025 14:51
<xsl:choose>
<xsl:when test="$dcatElementConfig">
<xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="cit:name">
<xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="(cit:name,'individualDoesNotCarryACitName')[1]">
Copy link
Member

Choose a reason for hiding this comment

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

@cmangeat can you explain this change?

Copy link
Contributor Author

@cmangeat cmangeat Sep 2, 2025

Choose a reason for hiding this comment

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

as individuals do not carry a cit:name they will never be taken into account when for-each-group.

indeed, when grouping by something empty (such as cit:name for an individual), it is not looping, cf. group-by-expression.

the workaround explained here can be used.

(this said, if the purpose of the group by is to avoid an organisation to be returned redundantly, it seems that it does not work (iso19115-3-to-dcat-agent is called many times), as there is no need to change 'individualDoesNotCarryACitName' by generate-id() when many contacts (individual not from an org): with 'individualDoesNotCarryACitName' static, every contact are returned. If of use (not sure), could be better to simply change for-each-group by for-each and remove group-by ?).

<xsl:otherwise>
<xsl:apply-templates mode="iso19115-3-to-dcat-distribution"
select="ancestor::mrd:MD_DigitalTransferOptions/mrd:distributionFormat/*/mrd:formatSpecificationCitation"/>
select="ancestor::mrd:MD_Distribution/mrd:distributionFormat/*/mrd:formatSpecificationCitation |
Copy link
Member

Choose a reason for hiding this comment

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

@fxprunayre can you check this change, I'm not really sure about this?

I assume that the original code only pointed to mrd:MD_DigitalTransferOptions to process the distribution formats defined in the same mrd:MD_DigitalTransferOptions container, no?

With the change, all formats defined at the distribution level will apply to each distribution.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed @josegar74 , maybe we can improve that.

In DCAT distribution object, the format is closely linked to the access URL.

In ISO, it is less true and it was a need that we mitigate with stuff like
#5465
Some users are also dispatching one download link in specific transferOptions in order to more closely link a URL with a format or a transferSize (dcat:byteSize) which in ISO are not in the online resource.

So I would not dispatch formats available in distribution ancestor everywhere. I would rather add an additional rule https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/dcat/dcat-core-distribution.xsl#L336-L339 and gives priority to transferOptions format if any and then fallback on distribution ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could fd0ce3b be an alternative ? i.e. adding an extra dcat distributiion section for formats from iso distribution info section level (not the ones in resources) ?


<xsl:apply-templates mode="iso19115-3-to-dcat-distribution"
select="ancestor::mrd:MD_DigitalTransferOptions/mrd:distributionFormat/*/mrd:fileDecompressionTechnique"/>
select="ancestor::mrd:MD_Distribution/mrd:distributionFormat/*/mrd:fileDecompressionTechnique |
Copy link
Member

Choose a reason for hiding this comment

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

Similar as previous comment.

@josegar74
Copy link
Member

@cmangeat, the pull request is updating also the geonetwork-ui submodule. I'm not sure if that's what's intended.

Also maybe the pull request title could be changed to something more clear, like: DCAT updates for contacts and distributions and describe a bit the changes proposed, thanks.

@josegar74 josegar74 added this to the 4.4.9 milestone Aug 29, 2025
@cmangeat cmangeat changed the title schema fixes DCAT updates for contacts and distributions Sep 1, 2025
… could be searched for fileDecompressionTechnique or formatSpecificationCitation
@cmangeat
Copy link
Contributor Author

cmangeat commented Sep 1, 2025

@cmangeat, the pull request is updating also the geonetwork-ui submodule. I'm not sure if that's what's intended.

Also maybe the pull request title could be changed to something more clear, like: DCAT updates for contacts and distributions and describe a bit the changes proposed, thanks.

Thank you. Sorry for the geonetwork-ui submodule not updated. Adressing other comments soon.

@cmangeat cmangeat marked this pull request as draft September 2, 2025 13:38
@cmangeat cmangeat marked this pull request as ready for review September 3, 2025 10:03
@sebr72
Copy link
Contributor

sebr72 commented Sep 4, 2025

@josegar74 @fxprunayre I believe we addressed all your comments in our last commit. Please confirm.


<xsl:template mode="iso19115-3-to-dcat"
match="mdb:distributionInfo/mrd:MD_Distribution/mrd:distributionFormat">
<dcat:distribution>
Copy link
Member

Choose a reason for hiding this comment

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

Unless I'm really wrong, this element will be invalid. See https://semiceu.github.io/DCAT-AP/releases/3.0.0/#Distribution, access URL is required.

I think what @fxprunayre meant is to modify the existing template to process the online resources, to use the transferOptions format if exists, otherwise use the distribution ones as you did in the original code.

I would rather add an additional rule https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/dcat/dcat-core-distribution.xsl#L336-L339 and gives priority to transferOptions format if any and then fallback on distribution ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot ! We did not know about it. Back to draft / analysis, ;-) !

@cmangeat cmangeat marked this pull request as draft September 8, 2025 13:09
@jahow jahow modified the milestones: 4.4.9, 4.4.10 Oct 7, 2025
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.

5 participants