Example 2: Post Get-Fragment Processing
This example first generates new document branch d/e below /a/b[1]/c.
As in example 1 we then get the fragment /a/b[1] which now includes the new
sub-branch d/e. Note: The final set operation has a reference that
starts at the new root /b element.
<idoc> <seq> <instr> <type>stm</type> <operand>doc.xml</operand> <operator> <stm:group xmlns:stm="http://1060.org/stm"> <stm:create-path newpath="d/e" xpath="/a/b[1]/c" /> <stm:get-fragment xpath="/a/b[1]" /> <stm:set select="." xpath="/b/c/d/e">
This was set on the new document
</stm:set> </stm:group> </operator> <target>this:response</target> </instr> </seq> </idoc>
Try it
 |