AstunTechnology / iso19139.gemini23

Gemini 2.3 schema plugin for Geonetwork
0 stars 7 forks source link

Duplicate spatialCoverage structured data element #108

Closed archaeogeek closed 1 year ago

archaeogeek commented 4 years ago

https://github.com/AstunTechnology/iso19139.gemini23/blob/3.10.x/src/main/plugin/iso19139.gemini23/formatter/jsonld/iso19139.gemini23-to-jsonld.xsl#L357 has a for-each statement which in some cases is leading to a duplicate element in the structured data, for example:

"spatialCoverage": {
      "@type":"Place"

        ,"geo": {
          "@type":"GeoShape",
          "box": "-0.894789 -0.213697 53.465041 53.704616"
        }

    }

    ,"spatialCoverage": {
      "@type":"Place"

    }

This leads to an error using the google rich results testing tool

archaeogeek commented 1 year ago

This problem occurs when there's a <gmd:EX_GeographicDescription> element alongside <gmd:EX_GeographicBoundingBox>