datacite / mds

The DataCite Metadata Store (MDS)
https://mds.datacite.org
Apache License 2.0
25 stars 16 forks source link

Creating new DOIs fails if publicationYear != != '[\d]{4}' #322

Closed ioverka closed 7 years ago

ioverka commented 7 years ago

System: https://mds.test.datacite.org/

The DataCite schema v 4.0 specifies a couple of "standard machine‐recognizable codes" which should be used if a required property is unavailable (see appendix 3). Using "(:none)" as value for the publicationYear returns an XML error though:

xml error: cvc-pattern-valid: Value '(:none)' is not facet-valid with respect to pattern '[\d]{4}' for type '#AnonType_publicationYearresource'.

Complete XML is:


<?xml version='1.0' encoding='UTF-8'?>
<resource xmlns='http://datacite.org/schema/kernel-3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd'>
<identifier identifierType='DOI'>10.15771/7888xxisk</identifier>
<creators>
    <creator>
        <creatorName>Max Planck</creatorName>
    </creator>
</creators>
<titles>
    <title>Test</title>
</titles>
<publisher>Max Planck Society</publisher>
<publicationYear>(:none)</publicationYear>
</resource>
ioverka commented 7 years ago

This issue is caused by DataCite, see https://github.com/datacite/mds/issues/322

ioverka commented 7 years ago

Sorry, I closed the wrong issue ;)

mfenner commented 7 years ago

For publicationYear, which is a numeric field, use 0000 if the publication year is not known. There is also guidance in the documentation on how to handle some specific situations.

ioverka commented 7 years ago

Thanks a lot for the swift reply. The current schema documentation doesn't include a reference to the value 0000. The section "Guidance for handling missing mandatory property values" under the heading "PublicationYear—Additional guidance" refers to appendix 3.

mfenner commented 7 years ago

Yes indeed. We should fix this.

mfenner commented 7 years ago

Closing this issues, as this should be fixed in The schema dokumentation.