metadata101 / iso19139.ca.HNAP

ISO Harmonized North American Profile (HNAP)
GNU General Public License v2.0
4 stars 19 forks source link

Spatial representation type should not be mandatory #299

Closed ianwallen closed 1 year ago

ianwallen commented 1 year ago

It should be possible to create a record without the Spatial representation type

But it keeps adding the Spatial representation type if it is deleted.

josegar74 commented 1 year ago

This is related to the following code:

https://github.com/metadata101/iso19139.ca.HNAP/blob/7b6586917fafb5022fbdaa0897eb3742c5b4423a/src/main/plugin/iso19139.ca.HNAP/inflate-metadata.xsl#L376-L380

We can remove it, but then I would update the metadata editor configuration:

https://github.com/metadata101/iso19139.ca.HNAP/blob/7b6586917fafb5022fbdaa0897eb3742c5b4423a/src/main/plugin/iso19139.ca.HNAP/layout/config-editor.xml#L454

To display an add button if the element is missing, so the user can add it from the default view. Something like this should work:

<field xpath="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType" 
           in="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification"
           or="spatialRepresentationType"/>