Project

Profile

Help

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

he / src / use-cases / strong / q3.xqlib @ a31dd97a

1
module namespace p="http://www.example.com/xq/postals";
2
import schema namespace ipo = "http://www.example.com/IPO";
3
import schema namespace pst = "http://www.example.com/postals";
4

    
5
declare function p:postal-ok($a as element(*, ipo:UKAddress))
6
  as xs:boolean
7
{
8
  some $i in doc("postals.xml")/pst:postals/element(pst:row)
9
  satisfies $i/pst:city = $a/city
10
       and starts-with($a/postcode, $i/pst:prefix)
11
};
12
                 
(15-15/27)