Open gothub opened 7 years ago
When requesting that context URL, the response you get is an HTTP 303 that has a Location header with a value of: http://data.datacite.org/10.5063%2FSCHEMA%2FCODEMETA-1.0
If you do an HTTP request for that (with Accept: application/ld+json
), you get this JSON-LD document:
{"@context":"http:\/\/schema.org","@type":"SoftwareApplication","@id":"https:\/\/doi.org\/10.5063\/SCHEMA\/CODEMETA-1.0","name":"CodeMeta: an exchange schema for software metadata. KNB Data Repository","author":[{"@type":"Agent","name":"Matthew B Jones"},{"@type":"Agent","name":"Carl Boettiger"},{"@type":"Agent","name":"Abby Cabunoc Mayes"},{"@type":"Agent","name":"Arfon Smith"},{"@type":"Agent","name":"Peter Slaughter"},{"@type":"Agent","name":"Kyle Niemeyer"},{"@type":"Agent","name":"Yolanda Gil"},{"@type":"Agent","name":"Martin Fenner"},{"@type":"Agent","name":"Krzysztof Nowak"},{"@type":"Agent","name":"Mark Hahnel"},{"@type":"Agent","name":"Luke Coy"},{"@type":"Agent","name":"Alice Allen"},{"@type":"Agent","name":"Mercè Crosas"},{"@type":"Agent","name":"Ashley Sands"},{"@type":"Agent","name":"Neil Chue Hong"},{"@type":"Agent","name":"Patricia Cruse"},{"@type":"Agent","name":"Dan Katz"},{"@type":"Agent","name":"Carole Goble"}],"publisher":"KNB Data Repository","datePublished":"2016","version":"1.0"}
Which has a @context
of http://schema.org
. Hence, that context is used.
Also, I noticed that your @type
in your example had a typo:
http://www.w3.org/2001/XMLSchema#dataTime
=> http://www.w3.org/2001/XMLSchema#dateTime
@dlongley Interesting. This DOI is typed as 'text/json', which may be causing the problem. The first URL request should return the resolution of the DOI, which should be
https://raw.githubusercontent.com/codemeta/codemeta/1.0/codemeta.jsonld
but maybe since the Accept
type doesn't match the DOI's type, the Datacite metadata page is
returned for the Location
instead. I'll try changing DOI type to application/ld+json
and see if that
fixes the problem.
Thanks!
I have a document with the remote context specified as a valid DOI:
Expanding this in the Playground gives a document with all properties resolved to schema.org, and not the values specified in the remote context:
What the expanded document should be:
I see similar behavior using the ruby toolkit. Is dereferencing a DOI not supported, or is there some extra step I need to take to make this work?