Iso19115-3.2018, full view, linkage multilingual support#9120
Conversation
9e9d109 to
681130d
Compare
681130d to
de69a18
Compare
|
test control file could be impacted by #9123 |
jahow
left a comment
There was a problem hiding this comment.
Thank you! this change looks good.
sebr72
left a comment
There was a problem hiding this comment.
Great, Especially the test part of it.
|
Was also fixed in #9071. |
|
@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 ? |
The change here works fine but render value produce an HTML 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>
<p xmlns:xs="http://www.w3.org/2001/XMLSchema"><a href="http://lemonde.fr">http://lemonde.fr</a></p>
Unless you have a particular template for linkage with So it is only about setting an attribute value with a string rather than with a node. |
This PR adresses three requirements:
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.
Furthermore, based on ui's language, the correct url should be chosen.
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
mainbranch, backports managed with labelGood 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.mdfilesLibrary management using
pom.xmldependency management. Update build documentation with intended library use and library tutorials or documentationFunded by geocat.ch