Duplicating the last node in a nodelist

Mark Birbeck's picture

The simplest form of the handler specifies a nodelist, and duplicates the last item in the list:

<xf:insert nodeset="list/y" />

The result would be:

<list>
  <y>y1</y>
  <y>y2</y>
  <y>y3</y>
  <y>y3</y>
</list>