<F>
<A></A>
<B>
<C></C>
</B>
</F><doc>
<X></X>
<Y></Y>
<Z></Z>
<doc>X and Y, then the result
is:<doc>
<F>
<A>
<X></X>
<Y></Y>
</A>
<B>
<C></C>
</B>
</F>
<Z></Z>
<doc>Since the element A was the first leaf in the fragment, it received
the selected content. The fragment was then inserted in the place of the
selection.
${selection} editor variable in the location you want to
place the surrounded fragment.