The delete element

Release 2.0 - ...

This action deletes one or more nodes from instance data.

For details on how the delete action is processed, see the specification (link below).

Example

XML CopyCode image Copy Code
<xforms:trigger>
   <xforms:label>Remove Current Item</xforms:label>
   <xforms:delete at="index('lineset')" ev:event="DOMActivate" nodeset="/lines/line"/>
</xforms:trigger>

Attributes

Name Required / optional Description
context optional Attribute containing an XPath expression evaluated using the in-scope evaluation context.
The Node Set Binding is required unless this attribute is present.
at optional Attribute containing an XPath expression evaluated using the Node Set Binding node-set to determine the delete location.
If the Node Set Binding node-set is empty, then this attribute is ignored.
Node Set Binding optional Any attributes from the Node Set Binding Attributes group (nodeset, model, bind).
Common Attributes optional Any attribute from the Common Attributes collection (e.g. id).
XML Events optional Any attribute from the XML Events collection (e.g. ev:event)
Common Action Attributes optional Any attribute from the Common Action Attributes collection (if or while)

Content

The delete element does not allow any content.

Specification

Link to the XForms specification: the delete element.