Re: N-triples white space question

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