Re: Ambiguity for Literal order in SPARQL

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/ 
rq25.html#OperatorMapping>

-R

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