SPARQL alignment with RDF 1.1

I had sent this to the sparql-dev group with no result, but the question is really about the WG plans for future alignment of SPARQL RDF 1.1, specifically around the elimination of simple and plain literals, as RDF 1.1 assigns datatypes to all literals (xsd:string, rdf:langString).

In a number of places in the SPARQL 1.1 spec, and in the test suite, the treatment of simple literals, plain literals and xsd:string literals are treated differently. An otherwise conforming SPARQL implementation which uses an RDF 1.1 dataset will not be able to distinguish between simple literals and xsd:string literals.

Gregg Kellogg
gregg@greggkellogg.net

Begin forwarded message:

> From: Gregg Kellogg <gregg@greggkellogg.net>
> Subject: Simple Literals vs xsd:string SPARQL with RDF 1.1
> Date: April 22, 2013 11:01:19 PM PDT
> To: "public-sparql-dev@w3.org" <public-sparql-dev@w3.org>
> 
> In RDF 1.1, there is no longer a difference between simple literals (those without language or datatype) and literals having a datatype of xsd:string. From RDF 1.1 Concepts [1]:
> 
> [[[
> A literal in an RDF graph consists of two or three elements:
> 
> 	• a lexical form, being a Unicode [UNICODE] string, which should be in Normal Form C [NFC],
> 	• a datatype IRI, being an IRI that determines how the lexical form maps to a literal value.
> ...
> Concrete syntaxes may support simple literals, consisting of only a lexical form without any datatype IRI or language tag. Simple literals only exist in concrete syntaxes, and are treated as syntactic sugar for abstract syntax literals with the datatype IRI http://www.w3.org/2001/XMLSchema#string.
> ]]]
> 
> I'm trying to reconcile this with the requirements of the SPARQL 1.1 tests, where there is a difference between a plain literal and one with xsd:string. For example [2], in this case, STRDT requires that it's argument be a simple literal, and specifically checks to be sure that literals having a datatype of xsd:string are excluded from the results:
> 
> [[[
> PREFIX : <http://example.org/>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> SELECT ?s (STRDT(?o,xsd:string) AS ?str1) WHERE {
> 	?s ?p ?o
> }
> ]]]
> 
> I realize that SPARQL 1.1 is defined against RDF 1.0, but I wonder if there is a transition plan, or an alternate set of tests that verify behavior against RDF 1.1 literal semantics? Or, perhaps I'm misunderstanding something else.
> 
> Gregg Kellogg
> gregg@greggkellogg.net
> 
> [1] http://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal
> [2] http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/strdt03.rq

Received on Wednesday, 24 April 2013 15:50:18 UTC