Created
June 23, 2012 13:51
-
-
Save ryanjdew/2978357 to your computer and use it in GitHub Desktop.
XPath returning new nodes 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| declare function local:sleep($node as node()) { | |
| (xdmp:sleep(xs:integer($node)), | |
| text {node-name($node)}) | |
| }; | |
| let $root := element root { | |
| element _1 {50}, | |
| element _2 {40}, | |
| element _3 {30}, | |
| element _4 {20}, | |
| element _5 {10} | |
| } | |
| return unordered {$root/*/local:sleep(.)} | |
| (: => | |
| _1 | |
| _2 | |
| _3 | |
| _4 | |
| _5 | |
| :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment