Re: N-triples white space question

On 18/05/12 15:49, Gavin Carothers wrote:
> On Fri, May 18, 2012 at 2:04 AM, Andy Seaborne
> <andy.seaborne@epimorphics.com>  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?
>
> The document says the following:
>
> N-Triples triples are a sequence of RDF terms representing the
> subject, predicate and object of an RDF Triple. These may be seperated
> by white space (spaces #x20 or tabs #x9). This sequence is terminated
> by a '.' and a new line (optional at the end of a document).

Forgive me for not quoting that text, and it also mentioned in 12.1.1, 
but the the grammar section, which does handle EOLs, does not mention 
white space or comments.  I am hoping the grammar section will be 
sufficient on it's own to implement the parser (tokeninzer and grammar).

It does also say "N-Triples triples are also Turtle simple triples," and 
"Turtle simple triples" leads me to think they are the same syntax, 
which they are not.

>> 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).
>
> Okay, the whitespace text can be move or repeated there along with in
> the introduction to N-Triples.

Good plan.

 Andy

>
>>
>>         Andy
>>
>

Received on Friday, 18 May 2012 15:00:53 UTC