Project

Profile

Help

How to connect?
Download (522 Bytes) Statistics
| Branch: | Revision:

he / src / use-cases / r / addq1.xq @ a31dd97a

1
(: test sort with explicit collation :)
2
<result>
3
  {
4
    for $u in doc("users.xml")//user_tuple
5
    let $b := doc("bids.xml")//bid_tuple[userid = $u/userid]
6
    order by $u/name collation "http://saxon.sf.net/collation?lang=sv;strength=primary"
7
    return
8
        <user>
9
            { $u/userid }
10
            { $u/name }
11
            {
12
                if (empty($b))
13
                  then <status>inactive</status>
14
                  else <status>active</status>
15
            }
16
        </user>
17
  }
18
</result>
(1-1/42)