Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 35071 invoked from network); 11 Nov 2005 12:43:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Nov 2005 12:43:35 -0000 Received: (qmail 31262 invoked by uid 500); 11 Nov 2005 12:43:33 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 31251 invoked by uid 99); 11 Nov 2005 12:43:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2005 04:43:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [85.76.8.113] (HELO localhost.localdomain) (85.76.8.113) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2005 04:43:25 -0800 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.13.4/8.13.4) with ESMTP id jABCh82x004606 for ; Fri, 11 Nov 2005 14:43:09 +0200 Message-ID: <437491DC.6090807@zitting.name> Date: Fri, 11 Nov 2005 14:43:08 +0200 From: Jukka Zitting User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: Re: How to limit the nodes amount with xpath query returned References: <620728fd0511062303o6f9ad543k@mail.gmail.com> <436F1EE6.9080603@gmx.net> <620728fd0511072252l57635f37p@mail.gmail.com> <43706BCC.5080006@gmx.net> <43736ED9.4060609@zitting.name> <43745490.6020407@gmx.net> In-Reply-To: <43745490.6020407@gmx.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, Marcel Reutegger wrote: > that would work for a plain xpath query. but what about queries that > have an order by clause? I'd expect something that allows me to limit > the resultset after ordering. Ah! I suppose you are right in this use case only being covered by a proprietary extension. I don't see XPath supporting this anytime soon (*), so perhaps JSR-283 could specify a limit/offset notation to extend the order by notation specified in JSR-170. (*) Full XPath 2.0 would actually be able to do this, but the hack is both ugly and very slow. See http://www.ximeco.org/Xime/XPathCanSortHlousek.pdf for the gory details. :-) PS. I'll still make a Jira issue for the enhanced position() function. It might come in handly every now and then. BR, Jukka Zitting