···
But the field is not displayed. In any case, with the button label, it’s ok for now, thanks.
Regards,
Jose García
On Thu, Jul 7, 2016 at 1:54 PM, Francois Prunayre <fx.prunayre@anonymised.com> wrote:
–
2016-07-07 13:51 GMT+02:00 Jose Garcia <jose.garcia@anonymised.com>:
Hi Francois
See feedback inline.
Regards,
Jose García
Not 100% sure, but if not using a template mode field, then it can’t display an input if the field is not in the XML. Would need some testing…
Francois
On Thu, Jul 7, 2016 at 1:33 PM, Francois Prunayre <fx.prunayre@anonymised.com> wrote:
Hi,
Ok, I have an old version of develop and the xsd seem not updated with that, but the attribute works. That’s much better.
Just to be sure, you mean that I can use this and that should display the button also?:
<action type=“add” name=“spatialResolution”
if=“count(/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance) = 0”>
But this doesn’t show the input text if the element is missing in the xml without requiring any button. Is there’re any way to do that? >From the documentation, seem it says that.
2016-07-07 13:16 GMT+02:00 Jose Garcia <jose.garcia@anonymised.com>:
Hi
I want to display 2 fields for gmd:equivalentScale and gmd:distance in a custom view. The gmd:spatialResolution can be missing in the metadata, so if possible display them anyway or at least display the button to add them
According to config-editor.xsd doc:
-
To display a field if exist in the metadata document or providing a add button in case it does not exist (specify in
and or
attribute):
-
Activate the “flat” mode at the tab level to make the form display only existing elements
- The add buttons are rendered, but both using the label defined for spatialResolution, so it’s confusing. Both buttons require to have the following (see full snippet below), if changed name or or attributes, the buttons are not displayed:
<action type=“add” name=“spatialResolution” or=“spatialResolution”
in=“/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification”
Is possible to setup a custom label for the actions?
See https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/config-editor.xsd#L1083
- Also tried to add in the view flatModeExceptions for the following elements, expecting that then would the fields would be displayed even if not in the xml and even if no Add buttons are configured, but no success:
Not sure if I’m missing something here or what I expect is not correct?
An easier way of doing this could be to use @if instead of @or/@in+flat
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/config-editor.xsd#L1011
–
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.
Francois
This is the snippet for the fields configuration:
<field
name=“equivalentScale”
xpath=“/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale”
or=“equivalentScale”
in=“/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/*” />
gmd:spatialResolution
gmd:MD_Resolution
gmd:equivalentScale
gmd:MD_RepresentativeFraction
gmd:denominator
gco:Integer</gco:Integer>
</gmd:denominator>
</gmd:MD_RepresentativeFraction>
</gmd:equivalentScale>
</gmd:MD_Resolution>
</gmd:spatialResolution>
<field
name=“distance”
xpath=“/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance”
or=“distance”
in=“/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/*” />
gmd:spatialResolution
gmd:MD_Resolution
gmd:distance
gco:Distance</gco:Distance>
</gmd:distance>
</gmd:MD_Resolution>
</gmd:spatialResolution>
Regards,
Jose García
–
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.