Closed twelch closed 9 years ago
Example record - http://wcga-vm01.sdsc.edu/discover/#?s=SCCOOS&text=manual
2015-02-15 is the published date but instead the creation date is displayed, 1916-08-22
We've confirmed that by manually switching the order of the two date records that the published date is used. This proves that the xpath used is simply returning the last date record and needs to be improved.
An ISO2 records published 2 different dates, creation and published like so
The problem seems to be that the second date is always parsed out as the published date. The XPATH match string that's used isn't smart enough to match the published date explicitly by using the DateTypeCode. Here is the current naive XPATH used here - https://github.com/Ecotrust/wc-data-registry/blob/master/site_raw/_includes/js/services/Metadata.js
isoii: "gmd\:identificationInfo > gmd\:MD_DataIdentification > gmd\:citation > gmd\:CI_Citation > gmd\:date > gmd\:CI_Date > gmd\:date > gco\:Date, identificationInfo > MD_DataIdentification > citation > CI_Citation > date > CI_Date > gdate > Date"