Closed josegar74 closed 8 years ago
The problem is that
returns a list of ref ids, for the gco:CharacterString
and the gmd:PT_FreeText
I have change this:
To this, to select the first element and the INSPIRE view looks fine displaying both values, but to check further:
<xsl:variable name="node" select="$metadata//*[gn:element/@ref = $nodeRef[0]]"/>
@fxprunayre if you can take a look to the change proposed, would be great. You know better this code.
The problem only applies to the template mode widget.
For the record, getOriginalNode was introduced to fix https://github.com/geonetwork/core-geonetwork/issues/875
It is related to that call https://github.com/geonetwork/core-geonetwork/blob/3.0.x/web/src/main/webapp/xslt/ui-metadata/form-configurator.xsl#L341 which send a list of nodes.
Turning debug mode on:
#getOriginalNode ==================
289 290
Match with ref: 289 290
<gco:CharacterString xmlns:gn="http://www.fao.org/geonetwork" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gml="http://www.opengis.net/gml"
xmlns:gts="http://www.isotc211.org/2005/gts"
xmlns:geonet="http://www.fao.org/geonetwork">INSPIRE Data Specification on Administrative Units - Guidelines v3.0.1<geonet:element ref="289" parent="288"
uuid="gco:CharacterString_df3a69a5-72b8-4d49-86fb-6cb298f2e350"
min="1"
max="1"/></gco:CharacterString><gmd:PT_FreeText xmlns:gn="http://www.fao.org/geonetwork" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
So the template mode does not support multilingual editing. eg.
<field name="conformity" templateModeOnly="true"
xpath="/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/
gmd:report/gmd:DQ_DomainConsistency/gmd:result"
del="../..">
<template>
<values>
<key label="conformity_title"
xpath="gmd:DQ_ConformanceResult/
gmd:specification/gmd:CI_Citation/gmd:title/gco:CharacterString"
tooltip="gmd:pass">
<helper name="gmd:title" context="/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:title"/>
</key>
</values>
<snippet>
<gmd:result>
<gmd:DQ_ConformanceResult>
<gmd:specification>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>{{conformity_title}}</gco:CharacterString>
</gmd:title>
We could at least copy PT_FreeText to avoid losing the information using :
<gmd:title>
<gco:CharacterString>{{conformity_title}}</gco:CharacterString>
<gn:copy select="gmd:PT_FreeText"/>
</gmd:title>
But it would be better to have the multilingual editing widget here. Not sure how to improve that.
FYI, getOriginalNode has been improved in https://github.com/geonetwork/core-geonetwork/issues/1328 but would not solve the multilingual editing in INSPIRE view.
Applied the fix suggested - a template field will allow editing the main language (and preserve translation). Closing that ticket.
Create a new one, if you need to add support for multilingual element in template field.
issue-multilingual.xml.txt
Test case:
1) System settings, set the Configuration per standard field default view for iso19139 to inspire, like:
2) Import the attached metadata that has 2 data quality sections with a lineage statement each one.
3) Edit the metadata -> No fields are displayed and the console the following error is output:
4) System settings, set the Configuration per standard field default view for iso19139 to simple, like:
3) Edit the metadata -> Metadata can be edited.