W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > February 2007

Re: Ambiguity for Literal order in SPARQL

From: Richard Newman <r.newman@reading.ac.uk>
Date: Wed, 21 Feb 2007 11:38:26 -0800
Message-Id: <900C9EA2-EA98-4EB4-859A-238F18020E7D@reading.ac.uk>
Cc: <public-rdf-dawg-comments@w3.org>
To: "Stephane Fellah" <stephanef@imagemattersllc.com>

Sorry for omitting that; that's already described in the SPARQL  
operator selection, which defines < for dateTimes, numeric values,  
booleans, and simple literals (strings).

The additional ordering constraints are only necessary when the more  
specific ordering rules do not kick in.  When two xsd:booleans are  
compared, the comparison never reaches the literal comparison stage,  
because op:boolean-less-than(A, B) is used instead. SPARQL defines  
additional ordering constraints for when these do not apply, e.g.,  
for unknown datatypes, or for comparing an xsd:boolean to a URI.

See <http://www.w3.org/2001/sw/DataAccess/rq23/rq25.html#modOrderBy>
and <http://www.w3.org/2001/sw/DataAccess/rq23/ 


On  21 Feb 2007, at 11:26 AM, Stephane Fellah wrote:

> Richard,
> I agree with the order you suggest however I think prior doing the
> comparison on the lexical form, we need to do a comparison on the  
> value
> space (date, numbers, boolean). If the value space comparison returns
> equality, then a lexical form comparison needs to be done.
> In this case we ensure we have a "semantic"/mathematical ordering  
> of literal
> value, not only syntactic.
> Stephane
Received on Wednesday, 21 February 2007 19:38:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:08 UTC