@at when target sequence is empty

https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_insert_Element

   <insert ref="item" origin="blank/item"/>

Adds an item to the end of the list. If the list is empty, a new item is  
inserted in the context, thus creating a list of length 1.

   <insert ref="item" at="1" position="before" origin="blank/item"/>

Adds an item at the beginning of the list. If the list is empty, nothing  
happens:

"If [@at] is not a number, is greater than the target-sequence size, or is  
less than 1, the insert action has no effect"

This is a mistake. XForms 1.1 says "[@at] is ignored if the Node Set  
Binding is not specified or specifies an empty node-set."

So I propose for the text to read:

"If the target-sequence is empty, the attribute is ignored; if it is not a  
number, is greater than the target-sequence size, or is less than 1, the  
insert action has no effect."

Steven

Received on Tuesday, 23 April 2019 13:07:44 UTC