W3C home > Mailing lists > Public > public-forms@w3.org > October 2007

Re: Small contraditction in readonly update spec?

From: John Boyer <boyerj@ca.ibm.com>
Date: Thu, 4 Oct 2007 17:06:11 -0700
To: Nick_Van_den_Bleeken@inventivegroup.com
Cc: "public-forms " <public-forms@w3.org>
Message-ID: <OFFC445C4C.94F3D947-ON8825736A.00833273-8825736B.00009145@ca.ibm.com>
Hi Nick,

Regardless of outcome, thanks for your thorough review of this topic.

In this particular case, I believe that what I wrote is actually correct.

The notion of 'replace' is like an insert followed by a *delete*, and if 
you look at delete, you will see that it does not allow deletion of a 
readonly node.  Clearly, if a node's parent is readonly, then the node is 
readonly, so as you require, a readonly node's content cannot be mutated 
by delete or submission replacement.  But in the delete and submission 
replace cases, you also cannot delete or replace a node if the node itself 
is readonly even if the node's parent readwrite. 

For insert, it is the parent that is checked because the node itself does 
not exist until after it is inserted, so it is non-sensical to check if a 
node "would be" readonly if it were added.  Instead, we look at the parent 
to see if its content is mutable by insert.

But for deletion and replacement, the node already exists and is 
identified as readonly, so deleting or replacing it would violate that 
model item property.  It is analogous to how relevant is processed.  When 
a node is non-relevant, we don't just remove all its attributes and 
content from the submission.  The relevance applies to the whole node.

John M. Boyer, Ph.D.
STSM: Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer





Nick_Van_den_Bleeken@inventivegroup.com 
10/04/2007 05:58 AM

To
John Boyer/CanWest/IBM@IBMCA, "public-forms " <public-forms@w3.org>
cc

Subject
Small contraditction in readonly update spec?






John,


Maybe I'm reading it wrong but if I read [1] ("This operation may fail if 
processing of the target attribute (including its default) yields a 
readonly node or a non-element node.") I come to the conclusion that:

1) when replace is 'text' submission fails if the node of which the 
content is going to be replaced is readonly
-> This is simular as doing a setvalue action on a node, so I think this 
is correct

2) when replace is 'instance' submission fails if the node that is going 
to be replaced is readonly
-> I think this is not desired. I think it should fail if the parent of 
the target node that is going to be replaced is readonly. Otherwise it is 
not similar to a delete followed by an insert action, what is similar to 
doing a replace of type 'instance'.

Regards, 

Nick Van den Bleeken  -  Research & Development
Inventive Designers
Phone: +32 - 3 - 8210170
Fax: +32 - 3 - 8210171
Email: Nick_Van_den_Bleeken@inventivegroup.com
[1] http://www.w3.org/MarkUp/Forms/specs/XForms1.1/index-diff.html#submit

--------------------------------------------------
Inventive Designers' Email Disclaimer:
http://www.inventivedesigners.com/email-disclaimer
Received on Friday, 5 October 2007 00:06:42 UTC

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