Re: SPARQL alignment with RDF 1.1

On 24/04/13 16:49, Gregg Kellogg wrote:
> 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.

... personal reply ...

There's no plan I am aware of.  The SPARQL-WG has been shutdown and no 
longer exists.

As you note, SPARQL 1.1 is defined against RDF 1.0 with the slight 
wrinkle that DATATYPE("foo"@en) is now rdf:langString [with a big red 
box around it] because that's quite critical to migration.

It would be good to have a plan - maybe we can raise "errata" against 
the test suite and record it in http://www.w3.org/2013/sparql-errata, 
else it's going to have to be on the W3C wiki.

(There isn't ex-WG-member update access to the Working Group CVS area 
anymore so I can't keep a separate file there, which would be a logical 
place).

Any place where there is an error in evaluation can be augmented by 
defining a result.  So an implementation is free to make:

strlang("foo"^^xsd:string, "en") --> "foo"@en

The two cases are STRDT and STRLANG.

	Andy


>>
>> 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 Thursday, 25 April 2013 13:54:22 UTC