History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-944
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Jeen Broekstra
Reporter: Jeen Broekstra
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

Definition of simple literal in QueryEvaluationUtil incorrect

Created: 04/Mar/12 10:31 PM   Updated: 05/Mar/12 10:41 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.6.4

Issue Links:
Cause
 
This issue is caused by:
SES-949 DATATYPE function must return rdf:lan... Major Resolved


 Description   
A simple literal is a literal with no language tag or datatype. See http://www.w3.org/TR/sparql11-query/#simple_literal.

However, due to a recent update, the definition used in QueryEvaluationUtil is incorrect: it assumes string-typed literals are also simple literals. This causes several SPARQL conformance tests to fail.

 All   Comments   Change History      Sort Order:
Comment by Jeen Broekstra [05/Mar/12 01:56 AM]
Ah, good point. But, as you can see in the link I gave, SPARQL 1.1 explicitly defines "simple literal" as a non-languagetagged, non-datatyped literal, so there seems to be an incongruity here.

Given that the main purpose of QueryEvaluationUtil is to support the SPARQL engine, I would prefer its method to conform to the SPARQL definitions, rather than RDF 1.1. At least, for now.

I think this quote from the RDF 1.1 WD you posted is relevant here as well:

 "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."

SPARQL is, of course, a concrete syntax, as are the syntax formats in which the data sets for the SPARQL conformance tests are defined. If we update the definitions in QueryEvaluationUtil, we have to also update all RDF parsers and writers, and probably also the implementations of the various ValueFactories. It's clear that we need to start paying attention to RDF 1.1 and update Sesame in several aspects, including the way it handles literals. But I think that that is a major update that we need to carefully execute and test to prevent stuff breaking.

Comment by James Leigh [05/Mar/12 01:41 AM]
I changed the function name in revision 11618 to align with the latest draft of RDF 1.1 Concepts and Abstract Syntax, which stays all literals have a datatype. xsd:string is the datatype of simple literals and rdf:langString is the datatype of literals with language tags.

http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#section-Graph-Literal