metadata101 / iso19139.ca.HNAP

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

remove gmd:characterSet inflating to utf8 #310

Closed wangf1122 closed 1 year ago

wangf1122 commented 1 year ago

The characterSet in identification (i.e. gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet)

image

is not mandatory. Bu the inflator always inflate this field to UTF8. This PR is to disable such inflating mechanism.

ianwallen commented 1 year ago

gmd:characterSet in gmd:MD_DataIdentification is not mandatory however the main gmd:characterSet off of gmd:MD_Metadata is mandatory So maybe the condition needs to be modified so that only the mandatory ones have the inflate.

wangf1122 commented 1 year ago

gmd:characterSet in gmd:MD_DataIdentification is not mandatory however the main gmd:characterSet off of gmd:MD_Metadata is mandatory So maybe the condition needs to be modified so that only the mandatory ones have the inflate.

I just tested from my local. We can make the XPATH more specific for this inflating logic only for gmd:MD_Metadata/gmd:characterSet. It will not affect the gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet and it's still nullable. I will commit the code shortly

ianwallen commented 1 year ago

I have tested on my PC and the current changes don't seem to work. It cause Double character set selection box for the mandatory one.

wangf1122 commented 1 year ago

I have tested on my PC and the current changes don't seem to work. It cause Double character set selection box for the mandatory one.

yes, same can be reproduced here as well. I am gonna take this PR down