Re: Multiple graphs syntax (ISSUE-68)

On Jan 31, 2012, at 18:35 , Markus Lanthaler wrote:

> Currently we have a 
> 
> {
>  "@context": "...",
>  "@id" : [
>     { "@id": ..." },
>     { "@id": ..." }
>  ]
> }
> 
> shorthand to avoid the need to re-declare the context in every disjoint
> graph as you normally would have to do:
> 
> [
>  { "@context": "...", "@id": "..." },
>  { "@context": "...", "@id": "..." }
> ]
> 
> 
> I think the easiest solution for this issue is to just remove the @id: @id
> "optimization". 
> 
> So, requiring an array at the top level would be cleanest solution IMO.
> Since the graphs are disjoint, it would even be fair to assume that they
> don't share the same context. If they are really the same, then well, one
> has to define them twice. Is that really such a bad thing?

I am sorry, but I do not think that is really good. My use case is the serialization of an RDFa content; that content very often contains several graphs (e.g., there might be statements on some content the author defines, and then some other statements on the enclosing HTML file). The context for all these graphs are identical or, to be more exact, an RDFa processor has no way to find out (or it is very complicated) which context should be used for which graph. As a result, possibly complex contexts (with all the namespace definitions from the RDFa source) will be repeated. I think that is ugly.

> 
> P.S.: Ivan proposed a @data keyword that could be used as the "root"
> element. I think that's overhead for an optimization which we don't really
> need. If someone would have to serialize a large number of disjoint graphs,
> he could simply put the context in an external file.
> 
> 

See my use case above.

Ivan


> 
> --
> Markus Lanthaler
> @markuslanthaler
> 
> 
> 
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Tuesday, 31 January 2012 17:54:56 UTC