Skip to content

Iso19115-3.2018, full view, linkage multilingual support#9120

Merged
jahow merged 2 commits intogeonetwork:mainfrom
cmangeat:iso19115-3_citation_linkage_multilingual_support
Dec 19, 2025
Merged

Iso19115-3.2018, full view, linkage multilingual support#9120
jahow merged 2 commits intogeonetwork:mainfrom
cmangeat:iso19115-3_citation_linkage_multilingual_support

Conversation

@cmangeat
Copy link
Copy Markdown
Contributor

@cmangeat cmangeat commented Dec 11, 2025

This PR adresses three requirements:

  1. Iso19115-3.2018 linkages are multilingual elements, when displaying them,
    A sequence of more than one item is not allowed as the first argument of string() (<gco:CharacterString/>, <lan:PT_FreeText/>)
    error must be avoided.

  2. Furthermore, based on ui's language, the correct url should be chosen.

  3. At the end, many scenarios should be supported:
    there is a name and an url in xml -> in html, name carry the url (href),
    there is no name but a url -> in html, 'url text' carry the url,
    there is a name but no url -> a text is displayed with no href.

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

  • Funded by geocat.ch

@cmangeat cmangeat force-pushed the iso19115-3_citation_linkage_multilingual_support branch from 9e9d109 to 681130d Compare December 11, 2025 10:37
@cmangeat cmangeat force-pushed the iso19115-3_citation_linkage_multilingual_support branch from 681130d to de69a18 Compare December 11, 2025 10:56
@cmangeat cmangeat changed the title Iso19115 3 citation linkage multilingual support Iso19115-3.2018, full view, linkage multilingual support Dec 11, 2025
@cmangeat cmangeat marked this pull request as ready for review December 11, 2025 11:22
@cmangeat
Copy link
Copy Markdown
Contributor Author

test control file could be impacted by #9123

Copy link
Copy Markdown
Member

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Thank you! this change looks good.

@jahow jahow merged commit a55959a into geonetwork:main Dec 19, 2025
7 checks passed
Copy link
Copy Markdown
Contributor

@sebr72 sebr72 left a comment

Choose a reason for hiding this comment

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

Great, Especially the test part of it.

@ianwallen ianwallen added this to the 4.4.10 milestone Feb 18, 2026
@fxprunayre
Copy link
Copy Markdown
Member

Was also fixed in #9071. render-value mode return HTML eg. <a href="link">link</a> - Looks like adding the HTML to the href attribute was converting the node to text and works, but it may be safer to use mode localised to get the link URL as text.

@sebr72
Copy link
Copy Markdown
Contributor

sebr72 commented Mar 27, 2026

@fxprunayre I/We could not understand what you meant by "It could be safer to use localised (rather than rendervalue) to get the link URL as text." When we looked at the code rendervalue calls localised, making the code behaviour equivalent. So we saw the advantage of making the code lighter. Could you please clarify ?

@fxprunayre
Copy link
Copy Markdown
Member

When we looked at the code rendervalue calls localised, making the code behaviour equivalent.

The change here works fine but render value produce an HTML <p> node and not a string of the link URL. Adding the <p> node in an href attribute using href="{$url}" works but may be better to set it directly with a string.

If you have

<cit:linkage xsi:type="lan:PT_FreeText_PropertyType">
                <gco:CharacterString>http://lemonde.en</gco:CharacterString>
                <lan:PT_FreeText>
                  <lan:textGroup>
                    <lan:LocalisedCharacterString locale="#EN">http://lemonde.en</lan:LocalisedCharacterString>
                  </lan:textGroup>
                  <lan:textGroup>
                    <lan:LocalisedCharacterString locale="#FR">http://lemonde.fr</lan:LocalisedCharacterString>
                  </lan:textGroup>

mode="render-value" return a node

<p xmlns:xs="http://www.w3.org/2001/XMLSchema"><a href="http://lemonde.fr">http://lemonde.fr</a></p>

mode="localised" returns http://lemonde.fr.

Unless you have a particular template for linkage with mode="render-value" which is not in main.

So it is only about setting an attribute value with a string rather than with a node.

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