Deleting elements is very similar.
The only thing to watch out for is that
<delete ref="buy"/>
deletes ALL the buy elements. If there's more than one, and you want to delete just one, you have to specify which:
<delete ref="buy[1]"/>
<delete ref="buy[last()]"/>
<delete ref="buy[. = 'cheese']"/>
One way is to delete the current element:
<repeat ref="buy">
<input class="inline" ref="."/>
<trigger>
<label>×</label>
<hint>delete</hint>
<action ev:event="DOMActivate">
<delete ref="."/>
</action>
</trigger>
</repeat>
deleteadd
Go back to the
insert-exercise.xhtml, and add a trigger to delete entries.