I implemented this in an experimental TriG parser a few years ago. I just made comma work anywhere, allowing the term before the comma to be repeated.

So if you want to say Alice, Bob, and Charlie all have friend Doug, you say:

  :Alice, :Bob, :Charlie :hasFriend :Doug.

Another example of subject-comma:

  :Alice, :Bob, :Charlie a foaf:Person.

I also allowed it in the predicate position:

  :sandro foaf:firstName,vcard:firstName "Sandro"

and in the Graph position:

  GRAPH :g1, :g2, :g3 { ... some triples }

That says that all three of those graphs contain those triples. When you want to say that, it's incredibly painful without this syntax.

Note that you can use them together:  <a>,<b> <c>,<d> <e>,<f>. is 8 triples.

I think this is a completely wonderful and elegant and useful syntax, and I shopped it around a little, but was unable to get folks in the RDF WG at the time (2013) interested. I resigned myself to it not being in Turtle or TriG, and I'd just put it in the language I was going to propose right after they went to Rec. Alas, that didn't happen. (It would also have allowed { } expression to occur anywhere a blank node can, as syntactic sugar for a blank node graph label, and make the pointy brackets optional when they're not required for parsing. And maybe some other things, like date literals.)

       -- Sandro

On 03/26/2015 07:59 AM, Bijan Parsia wrote:
I don’t understand the example or the goal.

On 24 Mar 2015, at 16:48, Fabiano Luz <[email protected] <mailto:[email protected]>> wrote:

Hello Folks,
On the predicate lists we have omitted the subject, for example:

     ?x  foaf:name  ?name ;
 foaf:mbox  ?mbox .

This is clear.

I wonder if there is some kind of "subject lists" where we omitted the
predicate, for example:

 foaf:Bob  foaf:phone  ?phone1; foaf:John  ?phone2 .

Er.. not so much. Let me try reformatting:

foaf:Bob foaf:phone ?phone1;
foaf:John               ?phone2.

Well, that syntax would be dreadful (as ambiguous) and not super readable (contrary to the first one). I guess you could add a pro-predicate.

foaf:Bob foaf:phone ?phone1;
foaf:John ^^^           ?phone2.

That could be general purpose so the first example was sugar for:

?x  foaf:name  ?name ;
        ^^^      foaf:mbox  ?mbox .

I don’t see the value.

PS: I do not want to repeat the predicate.

Why not? What’s the use case?

Cheers,
Bijan.


Reply via email to