Page size

In X-query, is there a way that you can return the result in a page size of no more than a fixed number of records say 25. And then display the next page until you view all result.

Hi,

in X-Query there is no possibility to limit the size of a result set. However Tamino does offer a cursoring concept which allows you to limit the size of a result set.

These are the basic commands for using a cursor:
1. open a session:
-http://host/tamino/db/collection?_connect=*

2. open a cursor:
-http://host/tamino/db/collection?_cursor=open&_xql=/your-query&_scroll=yes&_sessionid=your-sessionid&_sessionkey=your-sessionkey

3. fetch a result set:
-http://host/tamino/db/collection?_cursor=fetch&_handle=your-handle&_position=1&_quantity=1&_sessionid=your-sessionid&_sessionkey=your-sessionkey

It is important to know that the cursor works only within a session !

There is a chapter in the Tamino Documentation wich explains the cursoring concept in detail:

[Tamino-Directory]/Help/XPROG/XPRSPSTR.HTM#xprscom

Best regards,


Jan Harmsen
Software Engineer
Software AG

If you don’t want to program this stuff yourself - (and it is not that easy to get it right as you can see from the example),
all the Tamino APIs support this in a convenient way. You can set a page size and either there is a method to get you the next page (Tamino DOM APIs)
or there is an iterator which pages behind the scenes. (both Java APIs)