Problem with paging

Hello,
I’m using tamino 3.1.2.1 by js API
I’ve a doctype like this

one
two
three
four
five

I specify pageSize = 2 and make the following query:
BASE/CHILD
Paging doesen’t seem to work becouse all “child” nodes are returned instead the first two nodes.

Any ideas?

Thanks,

GXml

the query is: base/child lower case, of course…

GXml

The pagesize controls the number of parent documents that are returned, i.e. documents, and does not control the number of child elements returned.

Stuart Fyffe-Collins
Software AG (UK) Ltd.

ok, this now is clear but I’ve strange behaviors when I use sortby clause with the previous query. If I query base/child sortby(. asc) paging seems to work (only 2 results are returned) but here is another problem, base/child sortby(. asc) sorts only by doctype instance… an example:


1
2


3
4


page size = 10
query = base/child sortby(. desc)

2
1
4
3

I expect to see

4
3
2
1

I’m a bit confused,

regards,

GXml

Hello GXml,

I think that perhaps the confusion is being caused by a subtle difference between “inter-document” and “intra-document” sorting.

The sortby keyword sorts within documents, the sortall keyword sorts across documents. (Please also see this posting: sortby (INOXIE8309, Duplicate in sort key).)

Hopefully this query will solve your problem:

   base/child sortall(. desc)


Greetings,
Trevor.