Description
When expanding this compact data:
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns/",
"@vocab": "https://example.org/ns#",
"typeDescribed": {
"@id": "rdf:type",
"@context": {"@base": "https://example.org/ns/"},
"@container": "@id"
}
},
"@id": "/item/1",
"typeDescribed": {
"Item": {"label": "Item"}
}
}
I cannot tell from the spec (step 13.8.3.7.4 of the expansion algorithm) whether the key Item
will be resolved against the local context or not. Actually, reading the spec I see nothing that sets the active context to the local context of the typeDescribed
before reaching 13.8.3.7.4, although I would expect that this is the intention. Both the JSON-LD Playground and the Ruby RDF Distiller do expand the above to this:
[
{
"@id": "/test/item/1",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
{
"https://example.org/ns/label": [
{"@value": "Item"}
],
"@id": "https://example.org/ns/Item"
}
]
}
]
In the Ruby code corresponding to step 13.8.2 and onwards, IIRC, a container_context
is defined and from thereon used.
Unless I've missed something in the algorithm that clarifies that something like this is required, I believe we should clarify this exhaustively in the spec, and add this test case (unless I've overlooked an existing one for this).
I've made a similar adjustment to TRLD to reflect this presumably desired behaviour.
Metadata
Metadata
Assignees
Type
Projects
Status