W3C home > Mailing lists > Public > www-forms@w3.org > May 2006

Re: Two schema validation modes?

From: John Boyer <boyerj@ca.ibm.com>
Date: Thu, 25 May 2006 23:33:51 -0700
To: Mark Seaborne <m_seaborne@mac.com>, "Allan Beaufour" <beaufour@gmail.com>
Cc: www-forms <www-forms@w3.org>, www-forms-request@w3.org
Message-ID: <OFDC48E8CC.6BA13EAD-ON8825717A.00210C90-8825717A.00240E87@ca.ibm.com>
Hi Mark and Allan,

Been a bit busy the last couple of days, but I didn't want to let this one 
go for too long!

I believe we were actually being quite careful at a face-to-face meeting 
when we said in
Section 11.1 how schema validation would occur on submission.

We say that *all* selected instance data nodes are checked for validity 
according
to the validity rules specified in the section on xforms-revalidate, which 
in turn says
that an instance node is checked for compliance with its constraint and 
with all
schema definitions associated with the node.

We had to be very careful in this section in Second Edition because we 
removed 
from validty checking the check of compliance with the required MIP, so it 
had to be
added to the submission section in the same paragraph (11.1, bullet 2).

But to your question, the spec says *all* selected nodes are revalidated, 
not just
the leaf nodes. that contain values (character content) only.

Finally, Allan also made a second point about only values being validated 
during
the run-time of the form, with full schema validation happening only on 
submission.
While the spec supports full schema validation on submission (see above), 
I think
the part about only values being validated during the run of the form is 
something 
that we only talked about.

The spec for xforms-revalidate says that default processing checks *all* 
instance 
data nodes for validity, not just those that contain values (character 
content) only.
This does not mean that an implementation must literally check all the 
nodes; it only
has to behave as if it did.  Specifically, it is easy to optimize by only 
checking those
nodes whose content has changed.  A change to character content can occur 
by
 a number of means including an explicit setvalue action or an implicit 
setvalue that
might occur due to user input "travelling" through a UI binding.  But a 
change to 
structural content can also occur by such means as an insert or delete 
action.

It is worth discussing whether the common understanding from the community 
of
implementers is that "all instance nodes" actually meant "all instance 
nodes on the 
change list emitted from xforms-recalculate".  If the latter is the case, 
then a clarification
erratum is in order, at which point the schema validation would/could be 
restricted to 
values only. 

Onto the agenda it goes!

Best regards,
John M. Boyer, Ph.D.
Senior Product Architect/Research Scientist
Co-Chair, W3C XForms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/

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





Mark Seaborne <m_seaborne@mac.com> 
Sent by: www-forms-request@w3.org
05/22/2006 04:07 AM

To
www-forms <www-forms@w3.org>
cc

Subject
Re: Two schema validation modes?







Allan,

Having had a quick scan of the rec, I am forced to agree with your 
view. 11.1, bullet 2 leads me to believe that only values will ever 
be validated. I am sure that this is not the intent of the spec 
though. My understanding was like yours.

All the best

Mark

On 22 May 2006, at 11:54, Allan Beaufour wrote:

>
> I've always thought that we did schema validation in two different
> ways in XForms:
> 1) value validation during xforms-revalidate (instance node 
> changes, etc.)
> 2) full schema validation before submission
>
> Much to my suprise I cannot find wording for that in the
> specification. Am I blind, or is it just something that we have only
> talked about (or both :) )?
>
> -- 
> ... Allan
>
Received on Friday, 26 May 2006 06:34:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:04 GMT