- From: Ashok Malhotra <ashokma@microsoft.com>
- Date: Fri, 25 Jul 2003 14:44:52 -0700
- To: "Dimitre Novatchev" <dnovatchev@yahoo.com>, <public-qt-comments@w3.org>
- Cc: <dnovatchev@europe.com>
You are correct; document order is only defined for nodes. My mistake! I understand the semantic you desire but there is not a strong usecase for it. For most purposes the order-by clause provides the required function. All the best, Ashok > -----Original Message----- > From: public-qt-comments-request@w3.org [mailto:public-qt-comments- > request@w3.org] On Behalf Of Dimitre Novatchev > Sent: Friday, July 25, 2003 2:34 PM > To: public-qt-comments@w3.org > Cc: dnovatchev@europe.com > Subject: Re: FW: DN-FO-09: 15.1.11 fn:distinct-values > > > > We have clarified the text to indicate that order of the output sequence > if > > implementation dependent. We have also changed the wording of the > example > > as you suggested. > > Thank you. > > > > > If the user wants the output in a particular order, he can sort the > values > > by document order by using $x/. or in any other order by using the > order-by > > clause. > > > > Please let us know if this is satisfactory. > > Document order is defined for nodes. We may want to preserve the *sequence > order* > between the distinct elements that would be returned. > > The example I gave before: > > I have the following sequence of random numbers: > > 3, 5, 2, 8, 6, 4, 9, 7, 1, 5, 2, 10, 9, 3 > > I want to get only the (first occuring) distinct numbers with their > ordering > preserved: > > 3, 5, 2, 8, 6, 4, 9, 7, 1, 10 > > This could be possible if the distinct-values() function was defined with > an > additional argument "preserve-order" (possibly with default value of > false). > > > fn:distinct-values($srcval as xs:anyAtomicType*, > $preserve-order as xs:boolean? ) as xs:anyAtomicType* > > > Cheers, > Dimitre Novatchev. > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com >
Received on Friday, 25 July 2003 17:45:21 UTC