Created
June 14, 2012 13:30
-
-
Save ryanjdew/2930293 to your computer and use it in GitHub Desktop.
In Memory Advanced Transform Statements, Example 2
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
| (: | |
| let $oldx := /a/b/x | |
| return | |
| copy $newx := $oldx | |
| modify (rename node $newx as "newx", | |
| replace value of node $newx with $newx * 2) | |
| return ($oldx, $newx) | |
| => | |
| :) | |
| let $oldx := /a/b/x | |
| return | |
| ($oldx, | |
| mem:copy($oldx), | |
| mem:rename($oldx, fn:QName("","newx")), | |
| mem:replace-value($oldx, $oldx * 5), | |
| mem:execute()) | |
| (: | |
| => | |
| (<x>...</x>,<newx>...</newx>) | |
| :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment