Closed fkleedorfer closed 4 years ago
You are framing the merge graph, which is what folds in these separate values, but it should also fold in the separate types. I get essentially the same results in the Ruby implementation.
Looking into it, it seems like an issue in the Merge Node Maps algorithm in JSON-LD11-API. Step 2.2.1 adds property and values to merged node for keywords, which replaces the initial ex:Type1
and ex:Type2
values with a new value. It should probably be run only where property is a keyword other than @type
, and allow the otherwise clause in 2.2.2 to merge values.
Could you please file a bug in https://github.com/w3c/json-ld-api/issues.
Fixed for us - thanks!
The same resource is present in multiple named graphs. It has one or more
@type
entries in each graph, all different. When framing, matching on the resource's@id
property, only the@type
values from the last graph are present in the result.The test case below shows that for normal properties, all values are picked up (see
ex:multipleValues
). If one usesrdf:type
instead of@type
, all values are picked up. That will probably be our workaround for the time being.I am not 100% sure if this is a bug or works as specified, but I suspect it's a bug.
Tested on https://json-ld.org/playground/:
Input:
frame:
output:
expected output: (all three values for
@type
, not justex:Type3
)