W3C home > Mailing lists > Public > public-rdf-wg@w3.org > March 2011

Re: [Turtle] Two formats (was: Re: Turtle, Qurtle, Super-Turtle, N-Triple, N-Quads, Trig - BC and Scope)

From: Steve Harris <steve.harris@garlik.com>
Date: Thu, 3 Mar 2011 21:56:38 +0000
Cc: Sandro Hawke <sandro@w3.org>, nathan@webr3.org, RDF-WG <public-rdf-wg@w3.org>
Message-Id: <EC174BF9-77F5-4467-9E06-E6FBD9D0003A@garlik.com>
To: Richard Cyganiak <richard@cyganiak.de>
On 2011-03-03, at 14:23, Richard Cyganiak wrote:

> On 3 Mar 2011, at 07:51, Steve Harris wrote:
>> For one thing, some triplestores have different default behaviours when parsing triples formats than quads formats.
> [snip]
> This seems like an issue that calls for user education, tool documentation, and/or configuration options in those stores.
> I don't think you can argue that users have one firm expectation for the handling of N-Triples and a different firm expectation for N-Quads.

I really can. The usecases for those file formats are significantly different.

>> There's also the question of what to do if you find a N-Triples file in the wild, say as part of a web crawl. Currently it's safe to import any N-Triples file, and it will only affect triples within the graph of the file itself, but someone could deliberately create malicious N-Quads files designed to add data to well known graph URIs, or to deliberately corrupt provenance data in related graphs:
> This is a concern I share, and a reason why I'm opposed to multigraph/quad support in “small-scale” formats like TriG, Turtle, RDF/XML or RDF/JSON.

I also regard N-Triples as a "small-scale" format.

> I managed to talk myself into believing that N-Quads are for dumps and you never should just load them when crawling the Web.

Good :)

>> Consequently there are several cases where the user would like to have different behaviours depending on whether the file you're parsing has 3 or 4 columns, so lets make it easy to find out without pre-parsing the whole file.
> Not really an answer, but worthy of note: N-Triples currently are valid Turtle *and* valid N-Quads, distinguishable by file extension and (perhaps) media type.

Yes, it would be my preference for N-Triples files not to be legal N-Quads, see the discussion with Andy for reasons. Not a very strong preference though.

- Steve

Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Thursday, 3 March 2011 21:57:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:03 UTC