W3C home > Mailing lists > Public > semantic-web@w3.org > July 2007

TriG/N3 compatibility was: Named Graph Serialisation

From: Chris Bizer <chris@bizer.de>
Date: Fri, 27 Jul 2007 21:30:22 +0200
Message-ID: <006b01c7d084$a0a66b70$c4e84d57@named4gc1asnuj>
To: "Tim Berners-Lee" <timbl@w3.org>
Cc: <semantic-web@w3.org>, "Jeremy Carroll" <jjc@hpl.hp.com>, "pat hayes" <phayes@ihmc.us>, "Richard Cyganiak" <richard@cyganiak.de>, "Arjohn Kampman" <arjohn.kampman@aduna-software.com>
Hi Tim,

> Making the predicate optional, and omitting the final "." messes up the compatibility.  Two small changes! 

The predicate is optinal and there is no final "." because N3 and TriG are based on very different abstract models. In N3 you have the notion of a outer document that contains formulas. Therefore you want the final "." The abstract model behind TriG is the Named Graph data model and in newer versions also the SPARQL dataset. Both abstract model do not have any notion an outer document and therefore the final "." is missing in TriG. 

The TriG specification (http://sites.wiwiss.fu-berlin.de/suhl/bizer/TriG/) allows the use of the shorthand :- for compatibility reasons with N3 (I think Jeremy Caroll or Pat Hayes wanted it in as an option, I can not remember). We overlooked the final "." thing, so the :- option actually does not make TriG N3 compartible. 

I'm open to adding the final "." as an option, so that future versions of TriG parsers can read N3. I'm not too sure about making both things mandatory, as N3 and TriG really have different abstract models.

Any strong opinions on this from anybody? Especially from the people who have implemented TriG parsers and would have to change their code.

Cheers

Chris








--
Chris Bizer
Freie Universitšt Berlin
+49 30 838 54057
chris@bizer.de
www.bizer.de
  ----- Original Message ----- 
  From: Tim Berners-Lee 
  To: Chris Bizer 
  Cc: semantic-web@w3.org 
  Sent: Friday, July 27, 2007 5:15 PM
  Subject: Re: Named Graph Serialisation








  Chris, 


  I would really like to be able to parse Trix as N3.  It is so close!
  why not use a subset of N3?


  Instead of
  :G2 { :Monica rdf:type ex:Person .
        :Monica ex:hasSkill ex:Programming }


  why not use


  :G2 trix:graph { :Monica rdf:type ex:Person .
        :Monica ex:hasSkill ex:Programming }.


  which is N3.  There are subsets of N3 for NTriple, N3 rules, N3/rdf, Turtle, N3/query, and so on.
  A subset which is used for just expressing the contents of graphs would be easy to define.


  If the predicate trix:graph actually refers to a graph one would expect to get by dereferencing the document G2, then log:semantics could  be  used.   (I have wondered about adding shortcut  like :- or   @= for log:semantics as it crops up so often.)


  If on the other hand the semantics is that G2 is the graph (not the document), the owl:sameAs could be used, where the shortcut is = so you would get 


  :G2 = { :Monica rdf:type ex:Person .
        :Monica ex:hasSkill ex:Programming }.


  Making the predicate optional, and omitting the final "." messes up the compatibility.  Two small changes!  Thank you for making the rest compatible as it is. 


  Tim  
Received on Friday, 27 July 2007 19:31:03 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:01 UTC