W3C home > Mailing lists > Public > public-rdf-comments@w3.org > July 2012

Re: Turtle parsing

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Thu, 19 Jul 2012 17:04:59 +0100
Message-ID: <5008302B.2090102@epimorphics.com>
To: Mathias Hasselmann <mathias@taschenorakel.de>
CC: public-rdf-comments@w3.org


On 19/07/12 16:22, Mathias Hasselmann wrote:
> Am Donnerstag, den 19.07.2012, 16:15 +0100 schrieb Andy Seaborne:
>> (personal reply)
>>
>> On 19/07/12 15:47, Paul Gearon wrote:
>>> Hi,
>>>
>>> I have some questions and comments about the Turtle parsing grammar
>>> and current tests. I'm looking at the Working Draft found at:
>>>     http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/index.html
>>> so please let me know if I have made a mistake with the appropriate document.
>>>
>>>
>>> - The document makes no statement as to whether numbers literals
>>> should be represented canonically. Given that these can be represented
>>> as a raw number (e.g. 2.4 instead of
>>> "2.4"^^<http://www.w3.org/2001/XMLSchema#decimal>), then I would
>>> expect the canonical form to be appropriate. I suggest that whether or
>>> not canonicalization is required be documented.
>>
>> A parser generates RDF terms, and a literal is a lexical form and a
>> datatype (and maybe a language tag).  There is nothing about values and
>> a parser may not be aware of all datatypes.
>>
>> While I think we ought to encourage a value-centric view of the world,
>> and canonicalization is good, sometimes it is necessary to preserve
>> non-canonical forms - so the spec should not force it.
>
> I'd highly appreciate if the Turtle (and SPARQL) specifications would
> cover this topic. For instance the SPARQL test suite contains exactly
> such weird literals, and I don't know how to deal with them:
>
> http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/data-2.ttl
>
> :x5 :p "xyz"^^xsd:integer .
> :y5 :q "abc"^^xsd:integer .

(clarification: Nothing has changed here since RDF-2004 except you had 
to write in RDF/XML.)

Legal RDF terms.

Illegal as XSD integers.

This is what the SPARQL tests are about. The SPARQL test is showing 
handling of invalid lexical for the datatype.

I'm sure that offers of test suite material will be gratefully received.

	Andy

>
> Ciao,
> Mathias
>
Received on Thursday, 19 July 2012 16:05:31 UTC

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