Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with DateStamp transformation #104

Open
torrin47 opened this issue Dec 1, 2016 · 8 comments
Open

Issues with DateStamp transformation #104

torrin47 opened this issue Dec 1, 2016 · 8 comments

Comments

@torrin47
Copy link

torrin47 commented Dec 1, 2016

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>
@kvuppala
Copy link
Contributor

kvuppala commented Apr 25, 2017

@torrin47 @FuhuXia
We are looking into the issue, the sample catalog URLs provided are not working now.

Can you provide the metadata record example link to troubleshoot the issue.

@torrin47
Copy link
Author

I believe this is the equivalent example record in the new system:

https://catalog.data.gov/dataset/national-emissions-inventory-u-s-2014-epa-oar-oaqps-aqad

@charness39
Copy link

Here are a few more examples:

https://admin-catalog.data.gov/dataset/jobs-within-a-30-minute-transit-ride-service

https://catalog.data.gov/dataset/walkability-index

https://catalog.data.gov/dataset/smart-location-database-service

The records above also do not appear to have the links to the ISO or Original FGDC metadata.

@amilan17
Copy link

I believe that the fgdc2isoDate template is expecting a valid CSDGM date format, which in the example above would be 20161102 (without the dashes). It doesn't know how to handle ISO valid dates in the source CSDGM document...

@kvuppala
Copy link
Contributor

@amilan17 thank you, that seem to be the case.

@charness39 @torrin47 I see that publication date is parsed correctly on the example https://catalog.data.gov/dataset/national-emissions-inventory-u-s-2014-epa-oar-oaqps-aqad , would you be able to update the metadata date and try reharvesting?

We will look into the other two records where the ISO / FGDC metadata links are not getting displayed.

@torrin47
Copy link
Author

torrin47 commented Apr 26, 2017 via email

@FuhuXia
Copy link
Member

FuhuXia commented Apr 26, 2017

WAF harvester looks for timestamp for each xml file to determine whether update is needed. The file epa-national-emissions-inventory-region-1-2011.xml has a timestamp of 6/10/2016 7:15 AM, therefore it is skipped by harvester.

https://edg.epa.gov/WAFer_harvest/FGDC/

@torrin47
Copy link
Author

torrin47 commented Apr 26, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants