On Fri, 7 Sep 2018 at 13:42, Jean-Claude Moissinac <
jean-claude.moissinac@telecom-paristech.fr> wrote:
> Hello
>
> In my view, NT files are convenient because they can be aggregated simply
> by concatanating them
> But, the grammar is
> ntriplesDoc ::= triple
> <https://www.w3.org/TR/n-triples/#grammar-production-triple>? (EOL
> <https://www.w3.org/TR/n-triples/#grammar-production-EOL> triple
> <https://www.w3.org/TR/n-triples/#grammar-production-triple>)* EOL
> <https://www.w3.org/TR/n-triples/#grammar-production-EOL>?
> so, we can have an EOL at the begining of the file and one at the end of
> the file
> Then, by concatanation, we can have two EOL in the middle of the file,
> which is not conformant with the grammar
> Am I wrong?
>
You are. ;-)
Actually, the rule for EOL reads:
EOL ::= [#xD#xA]+
which allows for *several* newline characters (and a mix of Unix-, Windows-
or Mac-style newlines, for that matter).
So you can have as many empty lines as you wish between two triples, that's
still correct.
However, you made me realize that a valid n-triple file may *not* end with
a newline.
So if you want to concatenate them, you should insert a newline between two
files, to be on the safe side.
best
>
>
> --
> Jean-Claude Moissinac
>
>