Example 2: Insert a param substituted fragment before multiple targets
This is a more complex example. It demonstrates a mutlivalued xpath target. The xpath /a/b is
ambiguous and produces two <b> elements. The insert-before operation is applied to each of the
elements. In addition this uses parameter substitution to obtain the /i/j/k fragment which
is inserted before <b>.
<idoc> <seq> <instr> <type>stm</type> <operand>doc.xml</operand> <operator> <stm:group xmlns:stm="http://1060.org/stm"> <stm:insert-before xpath="/a/b"> <stm:param /> </stm:insert-before> </stm:group> </operator> <param>param.xml</param> <target>this:response</target> </instr> </seq> </idoc>
Try it
 |