Skip to content

ISO-19115-3 formatting to DCAT* fails on incomplete metadata date entry #9229

Description

@streino

Describe the bug

An ISO-19115-3 record with an incomplete mdb:dateInfo entry (missing gco:DateTime) will cause an exception when trying to display the record in DCAT*.

To Reproduce

Create a record with an incomplete mdb:dateInfo entry such as:

<mdb:dateInfo>
  <cit:CI_Date>
    <cit:date>
      <gco:DateTime />
    </cit:date>
    <cit:dateType>
      <cit:CI_DateTypeCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#CI_DateTypeCode" codeListValue="creation" />
    </cit:dateType>
  </cit:CI_Date>
</mdb:dateInfo>

Display the record using one of the DCAT* formatters, such as api/records/<id>/formatters/dcat or api/records/<id>/formatters/eu-geodcat-ap.

Actual behavior

Request returns 400.

Log on a local 4.4.9:

Error on line 101 of dcat-utils.xsl:
  XTTE0570: A sequence of more than one item is not allowed as the value of variable $date ("", "")
2026-04-06T16:04:54,515 ERROR [geonetwork] - A sequence of more than one item is not allowed as the value of variable $date ("", "")
net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the value of variable $date ("", "")

Expected behavior

Record should display in DCAT*, ignoring the faulty date entry.

Additional context

The "broken" record is properly handled by the SEMIC converter from api/records/<id>/formatters/eu-geodcat-ap-semiceu.

Surprisingly, CSW harvesting works in DCAT (outputSchema=http://www.w3.org/ns/dcat#), while it does fail "as expected" in GeoDCAT-AP (outputSchema=http://data.europa.eu/930/). I didn't investigate that part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions