Hello,

as I know, the position() function delivers only the order position in the
list of all childs of the parent node. So it is not 
usefull to limit the results of a query.

To limit the results in a query, you should use the "limit(int)" function
of the resulting query object.

Greetings
Michael




On Tue, 29 Jun 2010 10:08:40 +0200, Xiaojie Shen
<[email protected]> wrote:
> Hi
> 
> I saw an announce in 2007 that position() function doesn't work in
release
> 2.1. Is it the same today?
> 
> If it works now, can somebody explain how to use position() in Xpath
query
> to limit the number of search results? For example, how should it be used
> to the query below?
> String query = "//element(*, nt:file) [jcr:like(@jcr:createdBy, 'u%')]
> order by @jcr:created descending";
> 
> Thanks in advance!
> Shen

Reply via email to