Closed abbypenn93 closed 5 years ago
@abbypenn93 Should we use xmlns="http://schema.datacite.org/meta/kernel-4.0/" and xsi:schemaLocation="http://schema.datacite.org/meta/kernel-4.0/ http://schema.datacite.org/meta/kernel-4.0/metadata.xsd" in datacite.xsl?
<resource xmlns="http://schema.datacite.org/meta/kernel-4.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.datacite.org/meta/kernel-4.0/ http://schema.datacite.org/meta/kernel-4.0/metadata.xsd">
@abbypenn93 Have you ever tried to use Update DOI record
function to update other records in prod? I tried it with record https://librarytest.ucsd.edu/dc/collection/bb67275909 on QA and staging but I don't see the error.
hmmmm, @lsitu & @abbypenn93 so it looks like the url that was returning a 404 yesterday is now resolving. Maybe the server was down?
@abbypenn93 can we retest the orginal bug?
@arwenhutt But I just tried Update DOI record
for object https://library.ucsd.edu/dc/object/bb2666864s on prod and I was still seeing the error. Maybe it's just a problem for prod but not staging?
@lsitu oh darn. Not sure about the difference between staging and production - do you know if staging actually mints doi's? I don't think we'd want it to since it's just for testing.
@arwenhutt I think it should mints doi's from the DOI staging environment and @hjsyoo may know more about it. I think we may need to replicate the problem on QA/staging and confirm the fix before moving it to prod. Thanks.
@lsitu @abbypenn93 okay I think I figured it out. some of the fields datacite requires are at the component level instead of the object level. I added type of resource to the object level for https://library.ucsd.edu/dc/object/bb2666864s the item above, and the update doi function worked.
I'm going to close this issue, thanks for your time @lsitu!
Descriptive summary
Running Update DOI record fails and returns the following error message:
Error updating DOI: error: bad request - datacite: metadata validation error: Element '{http://datacite.org/schema/kernel-4}resource': Missing child element(s). Expected is one of ( {http://datacite.org/schema/kernel-4}resourceType, {http://datacite.org/schema/kernel-4}contributors, {http://datacite.org/schema/kernel-4}language, {http://datacite.org/schema/kernel-4}alternateIdentifiers, {http://datacite.org/schema/kernel-4}relatedIdentifiers, {http://datacite.org/schema/kernel-4}sizes, {http://datacite.org/schema/kernel-4}version, {http://datacite.org/schema/kernel-4}geoLocations, {http://datacite.org/schema/kernel-4}fundingReferences )., line 1 ×
The 4.0 schema targetNamespace (http://datacite.org/schema/kernel-4) that we are currently referencing no longer resolves.
DataCite's new location for the version 4.0 schema is: https://schema.datacite.org/meta/kernel-4.0/metadata.xsd
Rationale
Please replace xmlns="http://datacite.org/schema/kernel-4" with the version 4.0 schema targetNamespace, xmlns=https://schema.datacite.org/meta/kernel-4.0/metadata.xsd in datacite.xsl
Expected behavior
The function Update DOI record will mint a new DOI.
Actual behavior
This will depend on whether the scheme targetNamespace web location is the only problem. It may be the case that we now need to provide more information (more fields) to DataCite in order to mint a new DOI.
Steps to reproduce the behavior