W3C home > Mailing lists > Public > public-forms@w3.org > December 2011

Re: A few more ideas on delete and iterate

From: Leigh L Klotz Jr <leigh.klotz@xerox.com>
Date: Mon, 05 Dec 2011 16:20:24 -0800
Message-ID: <4EDD5FC8.1080907@xerox.com>
To: Nick Van den Bleeken <Nick.Van.den.Bleeken@inventivegroup.com>
CC: John Boyer <boyerj@ca.ibm.com>, ebruchez@gmail.com, Erik Bruchez <ebruchez@orbeon.com>, public-forms@w3.org
I don't think we're going to be able to agree on whether delete makes 
the node unusable in XForms 1.1 or not, and I don't think it's 
productive to argue it.

I think John has shown compelling use cases for the concept of removing 
a node from an instance and marking it to be skipped in actions and 
XPath functions that operate on instance data.  If you think about it, 
it's akin to a relevance MIP but extending to actions, just as setvalue 
obeys readonly.

So one way to look at this is to say it's a 'readable' MIP, and we might 
be able to decouple it from the way it gets set.

If that works out, we can then have an XForms 2.0 action to detach nodes 
from their parents, and leave them readable, and another to detach them 
and mark them readable=false.  Then we have firm semantics under control 
of XForms spec, and don't depend on one interpretation or another of how 
we have bolted on mutability to the XPath data model.  It fits well with 
John's implementation (a mark on a node is very much like the way some 
implementations store MIPs), and it lets us satisfy both sets of use 
cases in XForms 2.0.

Leigh.

On 12/02/2011 11:57 AM, Nick Van den Bleeken wrote:
>
> So the good news is that we only have to agree on if delete only 
> deletes nodes from instance data or also destroys the nodes and 
> behaves as if they are removed from all other sequences that contain 
> that node. I (and Erik I think) would go for the first option 
> (only delete only deletes nodes from instance data), and you would go 
> for the later I believe. We should try to come to a consensus on this.
>
> Maybe we could try to compile a list of the advantages and 
> disadvantages of both approaches?
>
> 1. Delete only deletes node from the instance
> + Behaves like remove works on DOM
> + No extra marking on the complete subtree of the deleted node
> - Need for an extra function to test if a node is part of an instance
>
> 2. Delete destroys node (behaves as if  all references to the node are 
> destroyed)
> +- When a node is deleted from the instance it disappears everywhere
> - Extra marking on the complete subtree of the deleted node
> - Requires extra checking in all iterate loops
> - Should all child actions of an action that no longer has a context stop?
> - Hard to implement if the node was retrieved before deleting it with 
> our DOM interface
>
> Kind regards,
>
> Nick Van den Bleeken
> R&D Manager
>
>  think everybody agrees on 3) too
Received on Tuesday, 6 December 2011 00:20:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:56 UTC