- From: Paul Murray <pmurray@anbg.gov.au>
- Date: Thu, 8 May 2014 14:34:24 +1000
- To: <public-rdf-comments@w3.org>
- Message-ID: <92B423B2-3C54-4AD4-B8C9-4E312CF6D33C@anbg.gov.au>
I am having some difficulty navigating the standard with respect to an object having multiple values for the same predicate:
<rdf:Description rdf:about="#myObject">
<rdfs:seeAlso rdf:resource="#anotherObject1"/>
<rdfs:seeAlso rdf:resource="#anotherObject2"/>
</rdf:Description>
After looking at the JSON-LD 1.0 Processing Algorithms and API, I have managed to work out that to do mutilple values for a predicate, you put them in an array. It's only if the expanded type of a key has @container that it's not treated as multiple values - it's treated as an RDF Collection.
It would be better if this was stated a bit more clearly in the main document - JSON-LD 1.0. The first mention of arrays in §3.1 "general terminology" gave me the impression that arrays are always rdf collections - it refers you to §6.11 Sets and Lists. I don't see anything up front to the effect that this only applies when there's a @container tag. None of the examples demonstrate this.
It would be good for there to be a section that explains that
{
"@id": "#myObject",
"@context": {
"bar": { @container = @set }
},
"foo": [ {"@id"="a"},{"@id"="b"},{"@id"="c"} ],
"bar": [ {"@id"="a"},{"@id"="b"},{"@id"="c"} ]
}
means
<rdf:Description rdf:about="#myObject">
<foo rdf:resource="a"/>
<foo rdf:resource="b"/>
<foo rdf:resource="c"/>
<bar rdf:parseType="Container">
<rdf:Description rdf:about="a"/>
<rdf:Description rdf:about="b"/>
<rdf:Description rdf:about="c"/>
</bar>
</rdf:Description>
Received on Thursday, 8 May 2014 04:35:12 UTC