W3C home > Mailing lists > Public > public-rdf-comments@w3.org > December 2014

Plain literals in Canonical N-triples

From: Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
Date: Fri, 26 Dec 2014 23:37:55 -0600
Message-ID: <CAPRnXtkcsiCpA=7KhGAe7E67SUceWjU=tp+UrA_kq2XFGeyokA@mail.gmail.com>
To: public-rdf-comments <public-rdf-comments@w3.org>
In http://www.w3.org/TR/n-triples/#canonical-ntriples I read:

> Canonical N-Triples has the following additional constraints on layout:
>     The whitespace following subject, predicate, and object MUST be a single space, (U+0020). All other locations that allow whitespace MUST be empty.
>     There MUST be no comments.
>     HEX MUST use only uppercase letters ([A-F]).
>     Characters MUST NOT be represented by UCHAR.
>     Within STRING_LITERAL_QUOTE, only the characters U+0022, U+005C, U+000A, U+000D are encoded using ECHAR. ECHAR MUST NOT be used for characters that are allowed directly in STRING_LITERAL_QUOTE.

and in http://www.w3.org/TR/n-triples/#sec-parsing-terms

> If neither a language tag nor a datatype IRI is provided, the literal has a datatype of xsd:string.

and in http://www.w3.org/TR/n-triples/#sec-literals

> If there is no datatype IRI and no language tag it is a simple literal and the datatype is http://www.w3.org/2001/XMLSchema#string.

> Example 3
>     <http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show"^^<http://www.w3.org/2001/XMLSchema#string> . # literal with XML Schema string datatype
>     <http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show" . # same as above

So I am not any wiser with regards to how to serialize plain literals
in RDF 1.1 Canoical N-Triples..

Are both of the two examples allowed in Canonical N-Triples? (it seems
so by the spec.. :-( ).

Which variant should I generate?

Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718
Received on Saturday, 27 December 2014 05:38:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:46 UTC