Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

GXE editor can't read repeated elements out #293

Open NG-AG opened 6 years ago

NG-AG commented 6 years ago

I'm extending the iso19115 profile by enabling the already created and unused GXE xml files to show the whole profile. The problem is that some elements have more than one occurrence, like the 'result' element in Quality reports. The iso19115 xml looks like this (see _geoportal/profiles/metadata/iso/iso19110/iso19110/schema/gmd/dataQuality/AbstractDQ_ElementType.xml):

<result>
    <DQ_ConformanceResult>
        ...
    </DQ_ConformanceResult>
 </result>
<result>
    <DQ_QuantitativeResult>
        ...
    </DQ_QuantitativeResult>
</result>

Creation of these metadata from the editor interface works perfect, but they won't show properly in the editor when trying to edit it again. The editor interface will only show information for the first 'result' element and will leave blank the other one.

I've noticed that repeated elements with g:maxOccurs="unbounded" don't have this problem though.

Is this a bug?

Cimentar commented 5 years ago

Hi, try to use elements g:matchTopElements and g:match to match right XML element.

Example from INSPIRE Keywords:

          <!-- INSPIRE data theme --> 
          <h:div g:label="$i18n.catalog.mdParam.inspire.keyword.dataTheme.label"> 
            <g:element 
              g:extends="$base/xtn/gmd/identification/XTN_InspireDataTheme_Keywords.xml">
              <g:matchTopElements> 
                <g:match
              g:qPath="gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString"
              g:qValue="GEMET - INSPIRE themes, version 1.0"
              g:qMode="must"/>
          </g:matchTopElements>
            </g:element>
          </h:div>