Re: TriG being disjoint from Turtle

On 18 May 2013, at 21:38, Gregg Kellogg <gregg@greggkellogg.net> wrote:

> On May 18, 2013, at 10:08 AM, Henry Story <henry.story@bblfish.net> wrote:
> 
>> 
>> On 18 May 2013, at 18:18, Henry Story <henry.story@bblfish.net> wrote:
>> 
>>> 
>>> On 17 May 2013, at 13:38, Sandro Hawke <sandro@w3.org> wrote:
>>> 
>>>> On 05/17/2013 06:00 AM, Jan Wielemaker wrote:
>>>>> On 05/17/2013 11:49 AM, Andy Seaborne wrote:
>>>>> 
>>>>> [this fragment is from Charles Greer, not answered by Andy]
>>>>> 
>>>>>> 1.  Could the spec be modified to allow TriG to be a superset of
>>>>>> turtle?  Specifically, could the production rules be modified to allow
>>>>>> a set of triples outside of any '{'  '}' to be the same as triples in a
>>>>>> default anonymous graph?  It seems that even now, the rules allow
>>>>>> multiple anonymous graph productions, whose union would be the unnamed
>>>>>> graph.  It would be convenient if we could dispense with these anonymous
>>>>>> curly braces altogether if possible.
>>>>> 
>>>>> Having implemented TriG yesterday on top of the Turtle parser, I must say that I was happily surprised that TriG does not allow for triples
>>>>> outside {}.  This means you can detect whether a document is a Turtle
>>>>> or TriG document at the first triple.
>>> 
>>> I completely agree. If we can have Trig be an extension of Turtle, then we
>>> are just one step from N3. Having this would be very useful to be
>>> able to quote graphs and do simple things that Atom allows one to do such
>>> as having a graph expressing the content of other resources.
>>> 
>>> eg:
>>> 
>>> So instead of having to write something like
>>> 
>>> <> rdf:member [ owl:sameAs <member> ;
>>>     :title "An Order for a sanwich" ;
>>>     :updated "2013-05-13..."^^xsd:dateTime;
>>>     :content """
>>>              @base ...
>>>              @prefix ...
>>> 
>>>              <> :title "An Order for a Sandwich";
>>>                     :primaryTopic <#x>
>>>             <#x> a TunaSandwich
>>>             ....
>>>           """^^lang:Turtle
>>>   ] .
>>> 
>>> One could write:
>>> 
>>> <> rdf:member [ owl:sameAs <member> ;
>>>      :title "An Order for a sandwich" ;
>>>      :updated "2013-05-13..."^^xsd:dateTime;
>>>      :content {
>>>        <member> :title "An Order for a Sandwich";
>>>                 :primaryTopic [ a TunaSandwich ] ....
>>> 
>>>       } 
>>>    ] .
>> 
>> Sorry that was N3. I am not sure what the Trig way to do that would be.
>> But I don't think the = sign is the right solution. That should be
>> reserved for owl:sameAs as it is in N3.
>> 
>> In N3 graphs can be unnamed so the :content relation above
>> I think there is better expressed with log:semantics.
>> 
>> This seems better
>> 
>> <Eric/ericP-foaf.rdf> log:semantics {
>> @base <http://www.w3.org/People/Eric/> .
>> @prefix ericFoaf: <ericP-foaf.rdf#> .
>> ericFoaf:ericP :givenName "Eric" ;
>>                :knows <http://norman.walsh.name/knows/who/dan-brickley> ,
>>                       [ :mbox <mailto:timbl@w3.org> ] ,
>>                       <http://getopenid.com/amyvdh> .
>> }
>> 
>> 
>> going on what is here:
>> http://www.w3.org/2010/01/Turtle/Trig
> 
> That still looks more like N3 than TriG. In existing TriG, you'd probably do something more like the following:
> 
> {
>  <> rdf:member [owl:sameAs <member>;
>       :title "An Order for a sandwich";
>       :updated "2013-05-13..."^^xsd:dateTime;
> }
> 
> <member> {
>  <member> :title "An Order for a Sandwich";
>    :primaryTopic [ a TunaSandwich]
> }
> 
> The proposed change, would be to be able to drop the {} around the default graph, not to allow a graph to appear in the subject or object position. So, with TriG which is a straight extension of Turtle, this might look like the following:
> 
> <> rdf:member [owl:sameAs <member>;
>     :title "An Order for a sandwich";
>     :updated "2013-05-13..."^^xsd:dateTime;
> 
> <member> {
>  <member> :title "An Order for a Sandwich";
>    :primaryTopic [ a TunaSandwich]
> }
> 
> Personally, I would like to be able to avoid having {} around the default graph,

thanks for the fix.
That makes sense to me. The aim should be to try to move towards N3 . The default graph URL would be the URL of 
the prefix.

> but people of objected that this makes it difficult to know if you are getting a graph syntax or a dataset syntax. Note that this situation already exists with JSON-LD, and a consumer only wanting a graph should just take the default graph portion of the document and discard the named graph portions. You could also distinguish document type by Mime type.

well of course the mime type will help distinguish both...
One could think of { } as a form of quation, something very similar to 
"..."^^lang:Turtle, except that one can use relative URLs in the { } quotes,
and the same prefix as the external text.

Perhaps the problem with Trig is just that it is too fixated on named graphs,
rather than thinking of graphs as a quotation syntax - another way to write literals
efficiently if you want.

Henry

> 
> Gregg
> 
>> 
>>> 
>>> One needs this if one is going to be able to for example GRDDL something
>>> as simple as an Atom Syntax document that contains RDF.
>>> 
>>>> 
>>> 
>>> Social Web Architect
>>> http://bblfish.net/
>>> 
>> 
>> Social Web Architect
>> http://bblfish.net/
>> 
>> 
> 

Social Web Architect
http://bblfish.net/

Received on Sunday, 19 May 2013 10:45:06 UTC