Created
June 14, 2012 13:28
-
-
Save ryanjdew/2930284 to your computer and use it in GitHub Desktop.
In Memory Advanced Transform Statements, Example 1
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
| (: | |
| copy $c := fn:root($file) | |
| modifiy (replace nodes $c/(: path where $file was :)/title with element title {"my new title"}, | |
| insert nodes attribute new-attribute {"my new attribute"} as last into | |
| $c/(: path where $file was :)) | |
| return $c | |
| => | |
| :) | |
| (mem:queue(), | |
| mem:replace($file/title, element title {"my new title"}), | |
| mem:insert-child($file, attribute new-attribute {"my new attribute"}), | |
| mem:execute()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment