Project

Profile

Help

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

he / src / use-cases / xmp / addq4.xq @ a31dd97a

1
xquery version "1.0";
2

    
3
(: Additional use case to demonstrate use of global parameters :)
4
(: Also demonstrates the text node constructor and comment node constructor :)
5

    
6
declare variable $x external;
7
declare variable $x-int := xs:integer($x);
8

    
9
<s>
10
  { for $i in $x-int to $x-int + 20 return 
11
        text { "[", string(2*$i), "]" }
12
  }
13
  <c>{ comment { "x =", $x-int } }</c>
14
  <pi>{ processing-instruction {"target"} { concat("data=", $x) } }
15
      { processing-instruction x { 3 } }</pi>
16
</s>
(5-5/38)