W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2011

Re: sparql11-results-csv-tsv

From: Steve Harris <steve.harris@garlik.com>
Date: Tue, 14 Jun 2011 18:03:05 +0100
Cc: public-rdf-dawg@w3.org
Message-Id: <3A45BE59-E285-4148-9A71-713C0A825766@garlik.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
On 2011-06-14, at 12:38, Andy Seaborne wrote:
> On 14/06/11 12:04, Steve Harris wrote:
>> Quick mini-review:
>> Abstract
>> 4store answers ASK in TSV as "true", but it should probably be
>> "ask\ntrue" or similar.
> Yes, it would have to be if it's TSV compatible, the header line is needed - whether an first empty record is (in practical terms) is safe, I don't know.

I think it would be friendlier on libraries to include a header.

>> 3.1
>> What's the purpose of allowing the header line to be absent? Does any
>> system do this now? It makes it tricky for consumers, and I prefer to
>> MUST the header for SPARQL results.
> Because the CVS does not require it - TSV does.  It agree it's better to include it but I think SHOULD is as strong as we can get, given that the CSV spec itself does not mandate it.

True, but there are for example things that are legal by the TSV spec that wouldn't be valid SPARQL Results, e.g.


so I don't have any issue with us imposing restrictions over and above what the base spec says.

> It does make some sense to omit if its being read into a spreadsheet as
> a table of numbers.  The point of CVS is consumption of information without RDF parsing.

I think that's rather a corner case though, how would the server even know that it's a spreadsheet, and that you didn't want headings, spreadsheets softly expect them too, e.g. in data operations. It means we win some issues around the column ordering, which is a little lose e.g. in SELECT *.

  ?x :val1 ?v1;
     :val2 ?v2;
     :val3 ?v3.


>> Why no ? preceeding the header out of interest? I guess it goes with
>> the STR(?val) in the data rows?
> Yes - CSV when read directly into a spreadsheet, the spreadsheet may well print the column names.  This is a good use of CSV over TSV.
> The variable is called "var", not "?var".  So, like the rest of the CSV format, it's strings.

Fair enough.

>> 4.1
>> Prefer requiring ? 5store uses $ for historical reasons, but 4store
>> uses ?
> I prefer choosing one char and ? is more common but I thought I'd at least point it out.

OK, consider this another vote for ?.

- Steve

>> On 2011-06-13, at 14:47, Andy Seaborne wrote:
>>> The content is now complete.
>>> http://www.w3.org/2009/sparql/docs/csv-tsv-results/results-csv-tsv.html
> To do:
>>> + More complete examples + References need folding into the ReSpec
>>> reference database (which is why there are two references sections
>>> currently, and you see [ [ABC] ] markers). + Do we add ASK answers
>>> as well? (and what is the header line for ASK? TSV requires one -
>>> empty?)
>>> Comments and feedback would be most welcome.
>>> Andy

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 Tuesday, 14 June 2011 17:03:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:04 UTC