xapi-ontology
xapi-ontology copied to clipboard
@context has many problems
For example, account
is "@type": "@id"
. Quoting the JSON-LD spec:
"@type": "@id" ← This means that a string value associated with [property] should be interpreted as an identifier that is an IRI
But in xAPI, account
doesn't have string values.
Other properties that should have "@type": "@id"
or at least some type, don't.
Some properties (and so, predicates) are defined as being what are classes in the ontology, such as verb
being defined as xapi:Verb
. Unlike account
, which at least doesn't generate bad RDF, this generates nonsense RDF.
The JSON-LD @context is bad enough I recommend it be deleted from this repository.
Thanks @fugu13 . This was an early attempt to try and show a JSON-LD context with a simple statement (current version of xAPI) vs. future version where we might add a @context.
I think I created this before you submitted the ontology fixes. Rather than delete, can you make further suggestions for improving?
I think this may come in to play when talking about future technical improvements to xAPI with the IEEE TAG group.
In the meantime, I'll make the changes to account and verb and any others you pointed out above.
And keep in mind the @context should be created based on what we envision being supported in terms of JSON-LD in a future version of the spec, not the current one.
Heh, misclicked, sorry
I think working on the @context
is a good idea. But the known-flawed @context
should be clearly separated from the intended-for-use things in the repository.
@fugu13 I tried my hand at a context to go along with the ontology I posted on #7. It's mostly complete (I don't think I've done extensions yet), but would probably be best split into multiple contexts. You can find it here, and that gist is public so you can just plug the raw uri into the Playground.