W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > November 2012

Re: ORDER BY and literals

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Thu, 22 Nov 2012 22:14:59 +0000
Message-ID: <50AEA3E3.3090209@epimorphics.com>
To: public-rdf-dawg-comments@w3.org

On 21/11/12 19:38, John Snelson wrote:
> We all know that the datatype() function has been changed in SPARQL 1.1
> to reflect the expected reality of RDF 1.1 typing.


This aspect of datatype() has not changed in SPARQL 1.1.


Only the datatype of literals-with-language tag has changed (which was 
an error in SPARQL 1.0 and replacing errors by results is an extension 
route for SPARQL expressions).

> to reflect the expected reality of RDF 1.1 typing.
> ... I would prefer ORDER BY to be updated to sort plain literals in
> the same way as xsd:string literals.

Plain literals covers

   + simple literals
     (literals without datatype and without language tag
      it's SPARQL terminology as there was no RDF term for it.

   + literals with a language tag.

There are no simple literals (strings with no language tag and no 
datatype) in RDF 1.1 parsed data.  So the issue of sorting is simplified 
in RDF 1.1 - the case of two RDF terms having the same value (simple 
literal and xsd:string) does not arise.  By giving an ordering to the 
same value but different terms items we get a consistent sort for such 

Plain literals with language tag will have SPARQL DATATYPE of 
rdf:langString where previously datatype() caused an error.

The rule for plain literals does at least mean the ordering between 
literals-with-language lag and xsd:string is defined (they do not have 
the same value).

Received on Thursday, 22 November 2012 22:15:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:31 UTC