- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Mon, 28 Apr 2008 17:49:36 -0700
- To: "Forms WG (new)" <public-forms@w3.org>
All,
At present, in XForms 1.0 and 1.1, the notions of "validity" and
"required-but-empty" are separate. I remember this being discussed in
the past, and the spec got at some point a clarification under "4.3.3
The xforms-revalidate Event" [1] which says "A node that satifies the
above conditions is valid even if it is required but empty."
I think that it is debatable that "required-but-empty" should not be
considered a constraint on the validity MIP, like other constraints
are. But certainly, the fact that it isn't had us confused in the
past, and still confuses users.
This said, whatever the WG thinks of above, we have so far clarified
this situation in the spec, so we look pretty consistent.
However, unfortunately, there is one exception: we added in XForms 1.1
an attribute called @validate on xforms:submission [2].
This attribute not only checks the validity as per xforms-revalidate,
but also checks whether there are nodes which are required-but-empty:
"If the attribute validate is true,whether by default or
declaration, then all selected instance data nodes are checked for
validity according to the definition in 4.3.3 The xforms-revalidate
Event (no notification events are marked for dispatching due to
this operation). Any selected instance data node that is required
but empty or found to be invalid stops submission processing after
dispatching event xforms-submit-error with context information
containing an error-type of validation-error."
So unfortunately we are in a situation where we very clearly have a
confused concept of validity in XForms:
* Validity as per the MIP definition and xforms-revalidate
* Validity as per xforms:submission and the @validate attribute
Those are different: the former does not include the notion of
"required-but-empty", and the latter does.
This can be fixed in two ways:
* Rename the attribute @validate on xforms:submission to something
else. This is easy, but it does not address the fact that it remains
confusing that "required-but-empty" is not considered a constraint
on validity.
* Consider "required-but-empty" a constraint on validity that adds to
constraints set by schemas, types, and constraint MIPs.
Looking forward to see what the WG things about this.
(I am running for cover in advance for raising such an issue this late
in the XForms 1.1 process.)
-Erik
[1] http://www.w3.org/TR/xforms11/#evt-revalidate
[2] http://www.w3.org/TR/xforms11/#submit
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/
Received on Tuesday, 29 April 2008 00:50:14 UTC