langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
17
Task/Filter/XQuery/filter-1.xquery
Normal file
17
Task/Filter/XQuery/filter-1.xquery
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(: Sequence of numbers from 1 to 10 :)
|
||||
let $array := (1 to 10)
|
||||
|
||||
(: Short version :)
|
||||
let $short := $array[. mod 2 = 0]
|
||||
|
||||
(: Long version with a FLWOR expression :)
|
||||
let $long := for $value in $array
|
||||
where $value mod 2 = 0
|
||||
return $value
|
||||
|
||||
(: Show the results :)
|
||||
return
|
||||
<result>
|
||||
<short>{$short}</short>
|
||||
<long>{$short}</long>
|
||||
</result>
|
||||
5
Task/Filter/XQuery/filter-2.xquery
Normal file
5
Task/Filter/XQuery/filter-2.xquery
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<result>
|
||||
<short>2 4 6 8 10</short>
|
||||
<long>2 4 6 8 10</long>
|
||||
</result>
|
||||
Loading…
Add table
Add a link
Reference in a new issue