W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2007

Comment on ORDER BY and language tags

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Fri, 23 Feb 2007 17:27:58 +0000
Message-ID: <45DF241E.2070201@hp.com>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>
CC: stephanef@imagemattersllc.com, Richard Newman <r.newman@reading.ac.uk>

TO: DAWG WG list
CC: the people commenting (feel free to correct my summary)

 From the comments list:

   and thread

My summary:
1/ Language tags - suggestion to add to the SPARQL language spec that there be 
a defined ordering on language tags.

2/ Query about extensibility
Do extensions to the operator table apply to ORDER BY?

3/ A request for a test case.

Note that this is tied to the operator table in sec 11 and what happens with 
"<" for literals with a language tag.

My understanding (Eric - can you confirm?) is that "<" on two literals with 
language tags is undefined and leads to an error.  As it's an error, an 
implementation is free to add "<".

Is it then legal to add "<" on unlike language tags so ordering works out?

Hopefully, that's a "yes"

As we don't require SPARQL engines to handle language tags, we can't add them 
to the ORDER BY section without adding them into the operator table, then the 
'use "<"' rule catches them.

Stephane refers to ARQ but there I preferred to give a total orders results 
which is deterministic always but is implementation dependent - for language 
tags it treats language tags as some sort of value space, named by lowercased 
language tag.  If all else is equals, it's lexical order of same language tag 
i.e. "x"@EN < "x"@en.  Similar for unknown datatype URIs and blank nodes there 
are sorting rules to put everything into a fixed order (which may change, but 
is very unlikely to, if you re-read the graphs with FROM - that's blank nodes 
for you).

For the test case: I found:
which is close but not quite right

Received on Friday, 23 February 2007 17:28:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:00:53 UTC