-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
We're seeing records where the datestamp isn't being accurately transformed, and are a little confused about why. Here's an example, where data.gov harvested a CSDGM record:
https://catalog.data.gov/harvest/object/9c6483ec-83d4-437c-bc16-fbfe40d5b896/original
with a //metd value of 2016-11-02, but the corresponding transformed ISO document:
https://catalog.data.gov/harvest/object/9c6483ec-83d4-437c-bc16-fbfe40d5b896
reports a //dateStamp value of 9999-01-01.
The XSLT doc looks ok, so what's causing this problem?
https://github.com/GSA/ckanext-geodatagov/blob/master/conversiontool/fgdc2iso/fgdcrse2iso19115-2.xslt
<gmd:dateStamp>
<xsl:choose>
<xsl:when test="(fn:contains(fn:lower-case(fn:normalize-space(fn:string(//metd))), 'unknown'))">
<xsl:attribute name="gco:nilReason">
<xsl:sequence select="xs:string('unknown')"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<gco:Date>
<xsl:call-template name="fgdc2isoDate">
<xsl:with-param name="dateField" select="normalize-space(//metd)"/>
</xsl:call-template>
</gco:Date>
</xsl:otherwise>
</xsl:choose>
</gmd:dateStamp>
Reactions are currently unavailable