Re: N-triples white space question

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 UTC