# Re: N-triples white space question

From: Gavin Carothers <gavin@carothers.name>
Date: Fri, 18 May 2012 07:49:22 -0700
Message-ID: <CAPqY83zVv8LjeM8h13hDy5Q4j8bXY4uagGYmuOjSwfmHhXfrTQ@mail.gmail.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
Cc: RDF-WG <public-rdf-wg@w3.org>
```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).

As discussed in this thread it could be a SHOULD, or MUST rather than
may. For most compatibility with the "Test Cases Format" (Old
N-Triples) it would be MUST.

>
> Does it inherit white space processing from the rest of Turtle? Comments
> seem to come from Turtle.

No, it does not.

>
> If it does not inherit white space rules,
>    what about horizontal white space inside triples?

Horizontal whitespace between subject, predicate and object is allowed.

>
> If it does inherit white space rules,
>   that includes newlines within triples between S/P or P/O.

No. Newlines between subject, predicate and object are not allowed.
However more than one new line at the end of a line is allowed.

>
> 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.

>
>        Andy
>
```
Received on Friday, 18 May 2012 14:49:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 22:02:05 UTC