RE: Collations

-------- Original Message --------
> From: Denis Gaertner <>
> Date: 11 September 2006 16:58
> 
> Hi!
> 
> I am interested in using different ways of comparing and ordering
> strings in a search query. 
> 
> ?s ?p ?string1 . ?s ?p2 ?string2 FILTER (?string1 <= ?string2)
> 
> This calls the Xpath compare function. I am interested in having
> something which is like a directory by ordering the strings
> alphabetically. So the definition of fn:compare has an argument for a
> collation which should be an appropriate one for this task. Is it
> possible to do this?    
> 
> Thanks
> 
> Denis

Hi Denis,

SPARQL allows functions to be added to the processors for extensibility.
While <= is dispatched to fn:compare/2 (code point) for strings, your
processor can also provide fn:compare/3 and so:

	FILTER (fn:compare(?string1, ?string2, "The Collation name"))

	Andy

Received on Tuesday, 12 September 2006 16:45:46 UTC