W3C home > Mailing lists > Public > public-rdf-wg@w3.org > May 2012

Re: N-triples white space question

From: Richard Cyganiak <richard@cyganiak.de>
Date: Fri, 18 May 2012 12:35:39 +0100
Cc: Andy Seaborne <andy.seaborne@epimorphics.com>, RDF-WG <public-rdf-wg@w3.org>
Message-Id: <37C8BA70-BABD-4A4A-A814-C9C9620AF6B9@cyganiak.de>
To: Eric Prud'hommeaux <eric@w3.org>

On 18 May 2012, at 11:34, Eric Prud'hommeaux wrote:
> Does the existing body of N-Triples permit a grammar with no default whitespace rules?
> 
>  triples: triple (LF triple)* LF?
>  triple: subject HWS predicate HWS object '.'
> 
> I.e, do all the N-Triples out there look like "<s> <p> <o>."?

This is what N-Triples as currently defined requires. Isn't that sufficient?

ntripleDoc	::=	line*
line		::=	ws* ( comment | triple )? eoln	
triple		::=	subject ws+ predicate ws+ object ws* '.' ws*
ws		::=	space | tab	
eoln		::=	cr | lf | cr lf	

Richard



> I note that Oracle has been vigilent about preserving backwards-compatibility. Souri, do you have a sense of what Oracle has been using?
> 
>> I also note that RDF 2004 N-Triples allows comments (only at the start of a line). This makes sense for the use as a test case format, but not much sense for the use as a dump format.
>> 
>> Best,
>> Richard
>> 
>> 
>> [1] http://www.w3.org/TR/rdf-testcases/#ntriples
>> 
>> 
>> 
>> On 18 May 2012, at 10:04, Andy Seaborne wrote:
>> 
>>> Gavin, Eric,
>>> 
>>> rdf-turtle says:
>>> 
>>> [1] ntriplesDoc	::= (triple)? (EOL triple)* (EOL)?
>>> [2] triple	::= subject predicate object '.'
>>> [8] EOL		::= ([#xD#xA])+
>>> 
>>> What are the white space rules?
>>> 
>>> Does it inherit white space processing from the rest of Turtle? Comments seem to come from Turtle.
>>> 
>>> If it does not inherit white space rules,
>>>   what about horizontal white space inside triples?
>>> 
>>> If it does inherit white space rules,
>>>  that includes newlines within triples between S/P or P/O.
>>> 
>>> The simplest solution is to add text in section 12.3 to say that horizontal white space outside tokens is discarded (which is different to Turtle).
>>> 
>>> 	Andy
>>> 
>> 
>> 
> 
> -- 
> -ericP
> 
Received on Friday, 18 May 2012 11:36:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:49 GMT