[OK?] Re: SPARQL: ORDER with IRIs

On Fri, Jul 22, 2005 at 02:09:00AM +0200, Bjoern Hoehrmann wrote:
> 
> Dear RDF Data Access Working Group,
> 
>   http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050721/ section 10.1
> notes "IRIs are ordered by comparing the character strings making up
> each IRI" it's however not clear how character strings are compared,
> I would have expected that a `string < string` operator is defined, but
> section 11.1 only defines such an operator for numeric and dateTime
> types. Please change the draft such that ordering of IRIs is clear.
> 
> regards,

Thanks for the comment. We've added:
[[
A < B where A is an xsd:string and B is an xsd:string returning
xsd:boolean and defined as op:numeric-equal(fn:compare(A, B), -1)	
]]
also, >, <= and >=

We've used that to define the ordering of U^HIRIs:
[[
The "<" operator (see the Operator Mapping Table) defines the relative
order of pairs of numerics, xsd:dateTimes and xsd:strings. SPARQL
defines a fixed, arbitrary order between some kinds of RDF terms that
would not otherwise be ordered. This arbitrary order is necessary to
provide slicing of query solutions by use of  LIMIT and OFFSET.

   1. (Lowest) no value assigned to the variable or expression in this
   solution.
   2. Blank nodes
   3. IRIs
   4. RDF literals
   5. A plain literal before an RDF literal with type xsd:string of
   the same lexical form.

IRIs are ordered by comparing the character strings making up each
IRI.

If the ordering criteria do not specify the order of values, then the
ordering in the solution sequence is undefined.

Ordering a sequence of solutions always results in a sequence with the
same number of solutions in it, even if the ordering criteria does not
differentiate between two solutions.
]]

If this text meets your requirements, please respond with [CLOSED] in
the subject to allow the issue tracking scripts to close this issue.
-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +81.90.6533.3882

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Tuesday, 18 October 2005 12:28:52 UTC