Based on initial research, the problem is due to the dateStamp element is expressed as a <gco:Date> element instead of <gco:DateTime>. OpenWIS extracts the URN and dateStamp information by using a XSL transformation. The class that does the transformation is MetadataAligner and the XSL file is extract-import-info.xsl.
The XSL file only searches for element of gmd:dateStamp/gco:DateTime. Thus it gives an empty string is the dateStamp is represented by gmd:dateStamp/gco:Date. This in turn leads to the failure of extracting dateStamp information, which is the cause of the above mentioned error message.
The ISO 19139 standard and WMO Core Metadata Profile 1.3 do allow both <gco:DateTime> and <gco:Date> to be used for the <gmd:dateStamp> element. So it would be helpful to modify the OpenWIS code to accomodate both representations.
Proposed Fix
The XSL file can be modified to geberate the dateStamp node as an union of <gco:Date> and <gco:DateTime>. Specifically the following line
Description
Over 600 metadata records from GISC Offenbach failed to be imported and the error message was Unable to extract an URN or a datestamp from the metadata record. An example of these metadata file can be found at http://oai.dwd.de/oai/provider?metadataPrefix=iso19139&set=WIS-GISC-OFFENBACH&verb=GetRecord&identifier=urn:x-wmo:md:int.eumetsat:EO:EUM:DAT:MFG:HPI-IODC
Analysis
Based on initial research, the problem is due to the
dateStamp
element is expressed as a<gco:Date>
element instead of<gco:DateTime>
. OpenWIS extracts the URN and dateStamp information by using a XSL transformation. The class that does the transformation isMetadataAligner
and the XSL file isextract-import-info.xsl
.The XSL file only searches for element of
gmd:dateStamp/gco:DateTime
. Thus it gives an empty string is the dateStamp is represented bygmd:dateStamp/gco:Date
. This in turn leads to the failure of extracting dateStamp information, which is the cause of the above mentioned error message.The ISO 19139 standard and WMO Core Metadata Profile 1.3 do allow both
<gco:DateTime>
and<gco:Date>
to be used for the<gmd:dateStamp>
element. So it would be helpful to modify the OpenWIS code to accomodate both representations.Proposed Fix
The XSL file can be modified to geberate the dateStamp node as an union of
<gco:Date>
and<gco:DateTime>
. Specifically the following lineshould be change to