ORCID-Source icon indicating copy to clipboard operation
ORCID-Source copied to clipboard

Invalid JSON-LD response, inconsistent URIs

Open jpmccu opened this issue 4 years ago • 1 comments

Content negotiating (or using the API) for JSON-LD responds with an invalid JSON-LD doc.

Specifically, schema.org does not serve a context at http://schema.org. The line:

"@context" : "http://schema.org",

Needs to be:

"@context" : { "@vocab" : "http://schema.org/"},

Since you're using schema.org exclusively.

Additionally, the URIs you are using to identify DOIs are not the same as DOI uses. DOI uses the URI prefix http://dx.doi.org/, while you are using https://doi.org/. Redirects occur between these, but the URIs themselves should be consistent so that when everything is loaded into the same RDF database.

Similarly, DOI uses http://orcid.org/ for its URIs, but you use https://orcid.org/, which is also inconsistent. I'm not sure which side needs to update that, but I'm including it here for completeness.

Until this is resolved, I will be rewriting the context using postprocessing, and changing URIs to reflect their origin's preference (http://dx.doi.org/ and https://orcid.org/).

Thank you for setting up this service though, it will be invaluable.

jpmccu avatar Nov 16 '20 17:11 jpmccu

For what it's worth, here's the argument against using the https: URI prefix.

https://www.w3.org/DesignIssues/Security-NotTheS.html

jpmccu avatar Nov 16 '20 18:11 jpmccu

For info, crossref DOIs prefer to use https://doi.org, not http or dx.doi.org (see https://www.crossref.org/blog/linking-dois-using-https-the-background-to-our-new-guidelines/) and datacite do the same. I am unsure what they specifically recommend in LOD use cases, but I expect it's the same.

We normalise the DOIs sent to us when returning them in metadata in v3.0 of the API. However, we also have a policy of sharing exactly what our members are adding in the format they add it, so that is returned in v2.0 by itself, and alongside a normalised form in v3.0. The DOI agencies do similar things. Sadly us PID providers can recommend things, but not enforce them.

We've not had reports from others having trouble with our schema.org data due to the context. The examples at schema.org use the same context string as we do: https://schema.org/docs/actions.html

Closing this issue due to age.

TomDemeranville avatar Nov 28 '22 16:11 TomDemeranville

That's well and good, but their linked data still uses http://dx.doi.org/... for its URIs. CURLing like this:

curl -H "Accept: text/turtle" -L 'https://doi.org/10.1002/lrh2.10352'

returns the following:

<http://dx.doi.org/10.1002/lrh2.10352>
        <http://prismstandard.org/namespaces/basic/2.1/doi>
                "10.1002/lrh2.10352" ;
...

Is that your problem or theirs? They have specified the http://dx.doi.org/ prefix for years now. I have also emailed [email protected] to ask them which way it should go, but you guys need to get your act together one way or another.

jpmccu avatar Dec 12 '22 21:12 jpmccu