- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Fri, 1 Jul 2005 13:33:27 +0100
- To: "'Erik Bruchez'" <erik@bruchez.org>, <www-forms@w3.org>
Hi Erik, > This is probably (hopefully) covered in the upcoming edition > of 1.0, but here it goes anyway: > > XForms 1.0 was initially very clear that the insert action > copies a prototype from the initial instance data. The errata > then (and also very > clearly) changed this behavior. The story of xf:insert actually goes back one step further! Initially -- in early drafts -- the behaviour was to duplicate the last node in a nodeset. The problem with this is that you can't then insert a node into an empty nodeset, so in an attempt to solve this, the spec was changed to say that you should duplicate the last node in the _initial instance data_. But that too has its own problems, which is that you can't find that initial instance data if you are about to insert into an nodeset . Whichever way you twist and turn, xf:insert has problems because everything is worked out based on a nodeset, not on a parent node. So, the decision was taken to revert xf:insert back to the first version -- duplicate the last node in the list -- and then add xf:duplicate to give us the ability to insert nodes into empty node lists (by being able to append a node to another). > The current public XForms 1.1 > draft however restates that 1.0 uses a prototype from the > initial instance data, the some additions: in 1.1 draft, the > prototype is copied from the position specified by the "at" > attribute. I can't see that. In: <http://www.w3.org/TR/xforms11/#insertAndDelete-action> it says that it doesn't use the initialisation instance data, and instead uses the live DOM. > Also, trying to delete the last node of a collection has no effect. That's new, I agree...and I have to say I've never noticed that before! You are right that it makes 1.0 and 1.1 forms behave slightly differently. > Given these contradictions, what is an implementor of 1.0 to > do? As far as I can see the only 'contradiction' is this point about xf:delete. Since 1.1 is still only a draft, I would go with the 1.0 functionality, although obviously including any points from the errata. > Do current XForms engines actually implement insert by > copying a node from the initial instance data, or do they > implement what's in the erroneous errata (tm)? Does it make > sense to already implement the proposed 1.1 behavior? I think most now use the live instance data for the prototypical instance. Regards, Mark Mark Birbeck CEO x-port.net Ltd. e: Mark.Birbeck@x-port.net t: +44 (0) 20 7689 9232 w: http://www.formsPlayer.com/ b: http://internet-apps.blogspot.com/ Download our XForms processor from http://www.formsPlayer.com/
Received on Friday, 1 July 2005 12:33:55 UTC