~paul-lucas/zorba/bug-932374

« back to all changes in this revision

Viewing changes to test/rbkt/Queries/zorba/collections/paging_4.xq

  • Committer: Paul J. Lucas
  • Date: 2012-09-21 20:26:47 UTC
  • mfrom: (10819.2.235 zorba)
  • Revision ID: paul@lucasmail.org-20120921202647-fy9n4jduhrnljrnb
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
 
2
import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
 
3
import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
 
4
 
 
5
declare namespace ann = "http://www.zorba-xquery.com/annotations";
 
6
declare namespace ns = "http://www.zorba-xquery.com/test";
 
7
 
 
8
declare %ann:sequential function local:test()
 
9
{
 
10
  ddl:create(xs:QName("ns:test2"));
 
11
  dml:insert-nodes-last(xs:QName("ns:test2"), <a/>);
 
12
  dml:insert-nodes-last(xs:QName("ns:test2"), <b/>);
 
13
  dml:insert-nodes-last(xs:QName("ns:test2"), (<c/>, <d/>, <e/>));
 
14
  (
 
15
    fn:count(dml:collection(xs:QName("ns:test2"), 3)),
 
16
    fn:count(dml:collection(xs:QName("ns:test2"), -1)),
 
17
    fn:count(dml:collection(xs:QName("ns:test2"), 100)),
 
18
    let $ref := ref:node-reference(dml:collection(xs:QName("ns:test2"))[3])
 
19
    return fn:count(dml:collection(xs:QName("ns:test2"), $ref, 0))
 
20
  )
 
21
};
 
22
 
 
23
local:test()