- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Mon, 22 Jul 2013 08:50:45 -0400
- To: Sandro Hawke <sandro@w3.org>
- Cc: Ivan Mikhailov <imikhailov@openlinksw.com>, W3C RDF WG <public-rdf-wg@w3.org>
* Sandro Hawke <sandro@w3.org> [2013-07-22 08:12-0400]
> On 07/21/2013 05:43 AM, Ivan Mikhailov wrote:
> >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 you like the syntax, you just want to use it for RDF Reification
> instead of RDF Datasets. If we didn't have datasets, I'd probably
> like that design a lot.
>
> But this is TriG, which is a dataset syntax. If people want to use
> RDF Reification, then it seems to me TriG is not the right language
> for them.
>
>
> >
> >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.
>
> Alternatively, OpenLink could use a keyword for this reification
> extension, like ":delete REIFIED { ... }" or (in keeping with the
> encoding you're using) ":delete STATEMENTS { ... }". That would
> have a much better chance of being accepted in SPARQL some day, I
> think. It seems pretty unlikely to me that a future SPARQL WG would
> ever endorse this extension, with its use of reification, the way
> you have it.
+1 to Sandro's priorities and proposal.
> Of course, what I really wish is that we could really solve the
> underlying problem by making Datasets and Reification be
> interoperable. I don't know a way to do that, technically, since
> reification is referentially transparent and datasets are
> referentially opaque. Maybe no one cares about that distinction,
> and we can just by fiat make Reification also opaque, with some
> magical handwaving. The idea is to somehow end up with:
>
> <s> <p> ?x.
> ?x rdf:subject <s1>;
> rdf:predicate <p1>;
> rdf:object <o1>.
>
> being somehow equivalent to (and interoperable with):
>
> <s> <p> ?x.
> GRAPH ?x { <s1> <p1> <o1> }
>
> (for all ?x). Anyone think that's possible?
Yes, but we need an extra arc in between:
<s> <p> ?x. ?x rdf:hasStatement ?y
?y rdf:s <s1>; rdf:p <p1>; rdf:o <o1>.
because ?x might contain multiple statements. The SPARQL graph syntax
simply gives you no access to the reifification label ?y . In
principle, the predicate where I placed rdf:hasStatement can define
lots of useful relationships like log:includes, but if we want
practical closure of the graph, e.g. mylog:comprisedOf, we don't have
any way of closing the set. Of course, we could complicate then
relationship by using Collections,
<s> <p> ?x. ?x rdf:hasStatementList/rdf:rest*/rdf:first ?y
?y rdf:s <s1>; rdf:p <p1>; rdf:o <o1>.
but that's kinda miserable syntactically and might not be necessary
for most use cases.
> -- Sandro
>
> >Best Regards,
> >
> >Ivan Mikhailov
> >OpenLink Software
> >http://virtuoso.openlinksw.com
> >
> >
> >
>
>
--
-ericP
Received on Monday, 22 July 2013 12:51:16 UTC