W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005


From: Steve Harris <S.W.Harris@ecs.soton.ac.uk>
Date: Mon, 15 Aug 2005 11:05:13 +0100
To: DAWG public list <public-rdf-dawg@w3.org>
Message-ID: <20050815100513.GE4129@login.ecs.soton.ac.uk>

I now have a crude implementation of ORDER BY, but I'm finding the
arbitrary ordering specified in the language spec. a bit inconvientient.

For example, if you have:

	WHERE { ?x rdf:value ?v .
	        FILTER(datatype(?v) = xsd:decimal) }

you might hope to get the highest v's back, but to my reading of the
spec you will get back the one with the most 9s at the start, or something
similar, as the ordering is lexical.

One way to get that might be allow casting in the ORDER BY constraint
(ORDER BY DESC(xsd:decimal(?v)), but that adds complexity, and I'm not a
fan of that. Another would be to relax the constraints on what the order
must be (eg, to just ensuring that its consistant), to allow the
implementations to do something sensible.

The current spec. seems to lead you to something which is quite
complicated to implement, but the complexity doesn't add much capability.

- Steve
Received on Monday, 15 August 2005 10:05:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:36 UTC