W3C home > Mailing lists > Public > public-rdf-wg@w3.org > February 2011

[Turtle] Grammar ambiguity?

From: Yves Raimond <Yves.Raimond@bbc.co.uk>
Date: Mon, 28 Feb 2011 09:55:58 +0000
To: public-rdf-wg@w3.org
Message-ID: <20110228095557.GA17077@dvbstreamer.national.core.bbc.co.uk>

I just noticed a potentially ambiguous point in the Tutle grammar at [1].

Considering the following document:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://localhost#>.

       rdf:type :Person;
       :age 18.

seems to be allowed by the grammar (resource resource integer.) But there's a potential ambiguity there (is the value of 'age' supposed to be parsed as a float or as an integer?)

Some Turtle parsers seems to reject this document (e.g. SWI-Prolog), rapper makes a best guess (parsing 18 as an xsd:decimal), but throws a syntax error, and the SemWeb.NET library [2] parses it as an xsd:integer without any errors or warnings.


[1] http://www.w3.org/TeamSubmission/turtle/#sec-grammar
[2] http://www.rdfabout.com/demo/validator/
Received on Monday, 28 February 2011 09:56:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:02 UTC