Closed dartasensi closed 3 years ago
Dear Davide,
These are the 3 ways allowed for "Non-empty Free Text Element":
Currently, the validation of the non-empty free text element is performed checking whether a non empty gco:CharacterString or gmx:Anchor is provided. The third case is already checked since a gco:CharacterString shall be provided.
I am not sure whether the LocalisedCharacterString, inside PT_FreeText, shall be non-empty since this element allows to define the translated text in external files using the id attribute.
Let's take, for instance from C.6 requirement, the organisationName which is a "Non-empty Free Text" element.
One valid option using the first way is:
<gmd:organisationName>
<gco:CharacterString>European Commission, Joint Research Centre<gco:CharacterString>
</gmd:organisationName>
Using the third way, this is valid:
<gmd:organisationName xsi:type="gmd:PT_FreeText_PropertyType">
<gco:CharacterString>European Commission, Joint Research Centre<gco:CharacterString>
<gmd:PT_FreeText>
<gmd:textGroup>
<gmd:LocalisedCharacterString locale="#locale-sp">Comisión Europea, Centro Común de Investigación</gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:organisationName>
Using the third way, this is not valid because the CharacterString elemenent is empty:
<gmd:organisationName xsi:type="gmd:PT_FreeText_PropertyType">
<gco:CharacterString><gco:CharacterString>
<gmd:PT_FreeText>
<gmd:textGroup>
<gmd:LocalisedCharacterString locale="#locale-sp">Comisión Europea, Centro Común de Investigación</gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:organisationName>
Using the third way, this is not valid because the CharacterString elemenent is missing:
<gmd:organisationName xsi:type="gmd:PT_FreeText_PropertyType">
<gmd:PT_FreeText>
<gmd:textGroup>
<gmd:LocalisedCharacterString locale="#locale-sp">Comisión Europea, Centro Común de Investigación</gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:organisationName>
Then, there is an option as mentioned above to define the translations externally using the id attribute.
<gmd:organisationName xsi:type="gmd:PT_FreeText_PropertyType">
<gco:CharacterString>European Commission, Joint Research Centre<gco:CharacterString>
<gmd:PT_FreeText>
<gmd:textGroup>
<gmd:LocalisedCharacterString locale="#locale-sp" id="orgname_sp"></gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:organisationName>
In my opinion, this last option should be valid because the organisationName, as a whole, is not empty due to the CharacterString element.
What do you think?
Regards,
Daniel
Dear Daniel,
could you please explain me better the use of id? I'm currently not aware of that external reference "id" option, and I could not find it in the ISO schemas, nor in the TG.
Davide
Dear Davide,
I have no pratical experience using this particular option. As far as I can see in ISO 19115,
The localised string related to a given locale can be stored in a corresponding locale container (i.e., XML File) and referenced from the PT_FreeText.textGroup property instances
This might be useful when the main metadata file is in a character set, i.e. UTF-8, different than the alternative language you would like to provide.
There are more information in section Multilingual support for free text fields in the mentioned ISO.
Although the option to use PT_FreeText is available, I would suggest not to use it in the context of INSPIRE. In order to provide different languages, a better approach is to generate different metadata files and access them using the discovery service. In the TG for metadata 2.0 you can find the following paragraph:
Note that using explicitly localised free text is usually not required in INSPIRE metadata records, as the entire metadata record must be provided using the same natural language (see section 2.3.1). Localised versions of the metadata records are provided by using the language selection mechanism of the INSPIRE Discovery Service.
Regarding the point of checking whether the PT_FreeText element is empty, I think is not needed since a CharacterString shall be always provided using that option and that one is already checked to not be empty.
Regards,
Daniel
Dear @dartasensi,
Thank you very much for your question. We hope that the answer you were offered at the time was to your convenience.
Please feel free to open another issue if necessary.
Best regards.
While reviewing the checks involved in issue #139, I found that for some cases there's no checks about the third option mentioned in the C.4 requirement. It seems to check only the existence of gco:CharacterString or gmx:Anchor, but not this:
[...] 3. re-typing the containing element to gmd:PT_FreeText_PropertyType using the xsi:type attribute and providing both gco:CharacterString and gmd:PT_FreeText child elements.
Moreover, it should also check that, if requested by the spec and the node is present, also PT_FreeText shall be not empty.
Kind regards, Davide Artasensi