Limit in XQuery

Hi

I need to implement an XQuery which will return a subset of the whole data. in sql it would look like:

select * from table LIMIT 5;

how can this be done via XQuery (or the Java API)?

Cheers
Brian

There is an answer to this question back in the Java API forum:

http://tamino.forums.softwareag.com/viewtopic.php?p=3362

An even better answer to this is here: http://tamino.forums.softwareag.com/viewtopic.php?p=8823