Re: Turtle parsing

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 .

Ciao,
Mathias

Received on Thursday, 19 July 2012 15:23:16 UTC