Re: adding inline graphs to TriG

On Tue, 2013-07-16 at 20:53 -0400, Sandro Hawke wrote:
> I know this is going to seem to some people like it's going too far,
> but it seems to me like such a good idea, in good conscience I have to
> at least seriously propose it.    If there aren't at least three +1's
> for this email, I wont mention it again.
> 
> Right now, in TriG, you can say things like:
>         [ a :Patch;
>           :deletes _:g1;
>           :inserts _:g2 ].
>         GRAPH _:g1 { ... }
>         GRAPH _:g2 { ... }
>         
> I think it would make a whole lot of sense to allow a little syntactic
> sugar.  I'd like to allow this:
>         [ a :Patch;
>            :delete { ... };
>            :inserts { ... } ].

I'm sorry, the syntax { triple . triples . triples ... } is in use for
blank node formulas in some dialects.

SQL> TTLP ('<s> <p> { <s1> <p1> <o1> , <o2> } .', 'http://example.com/',
'http://example.com/');

SQL> sparql define output:format "NICE_TTL" with <http://example.com/>
construct where { ?s ?p ?o };
fmtaggret-NICE_TTL
LONG VARCHAR
_______________________________________________________________________________


@prefix ns0:    <http://example.com/> .
@prefix ns1:    <http://www.w3.org/2000/10/swap/reify#> .
@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

ns0:s
        ns0:p   [       ns1:statement   [       rdf:type
rdf:Statement ;
                                                rdf:object      ns0:o1 ;
                                                rdf:predicate   ns0:p1 ;
                                                rdf:subject     ns0:s1
] ,
                                        [    rdf:type
rdf:Statement ;
                                                rdf:object      ns0:o2 ;
                                                rdf:predicate   ns0:p1 ;
                                                rdf:subject     ns0:s1 ]
] .
ns0:s1
        ns0:p1  ns0:o1 , ns0:o2 .


So I'd strongly insist on disambiguation keyword like

[ a :Patch;
   :delete GRAPH { ... };
   :inserts GRAPH { ... } ].

or something like that if the feature is ever introduced.

Best Regards,

Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com

Received on Sunday, 21 July 2013 09:43:28 UTC