metadata101 / iso19139.ca.HNAP

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

Remove geonet:* elements from update-fixed-info #390

Closed tylerjmchugh closed 1 month ago

tylerjmchugh commented 2 months ago

When an imported record is processed and the geonet:info element is added it is possible that there is already a (possibly invalid) geonet:info element.

This results in a sequence of elements which causes other xslt like csv-search to fail as they expect a single element.

image

Error on line 94 of csv-search.xsl:
  XTTE1020: A sequence of more than one item is not allowed as the @select attribute of xsl:sort

This PR aims to fix this issue by adding a template to update-fixed-info that will match and remove all old geonet:* elements when the record is saved.

That way there is only a single valid geonet:info element for the other xslt to use.