[xquery-talk] Default sort order in order by

Jens Teubner jens.teubner at in.tum.de
Thu May 18 22:16:54 PDT 2006

On Thu, May 18, 2006 at 11:02:49PM +0400, Ivan Shcheklein wrote:

> I can't find out from the XQuery specification what is the default
> value - ascending or descending - in the order by modifiers?

The XQuery 1.0 Candidate Recommendation is quite clear about this
(http://www.w3.org/TR/xquery/, Section 3.8.3):

  1. If V1 is greater-than V2: If the orderspec specifies descending,
     then T1 precedes T2 in the tuple stream; otherwise, T2 precedes T1
     in the tuple stream.

So, everything but `descending' is to be interpreted as `ascending',
including the absence of an explicit modifier.


Jens Teubner
Technische Universitaet Muenchen, Department of Informatics
D-85748 Garching, Germany
Tel: +49 89 289-17259     Fax: +49 89 289-17263

So, is the glass half empty, half full,
or just twice as large as it needs to be?

More information about the talk mailing list