Name

delete

Synopsis

This action is the counterpart of insert—it removes nodes from the instance data. Without the issues of copying nodes from a template, the overall operation of this element is much simpler.

This element also has an attribute named at, which operates the same way as insert. It identifies an element node that is removed, along with any associated nodes (content text nodes, child element nodes, attribute nodes, and so on). The corresponding user interface for the repeat will also adjust to the now smaller repeat set.

This example continues the example in the previous section:

<trigger>
  <label>Remove current item</label>
  <delete ev:event="activate" nodeset="/order/items/item"
   at="index('repeat_id')"/>
</trigger>

Get XForms Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.