W3C home > Mailing lists > Public > www-forms@w3.org > June 2005

Re: Question about XML Schema validation

From: Erik Bruchez <erik@bruchez.org>
Date: Thu, 09 Jun 2005 20:21:31 +0200
Message-ID: <42A888AB.3040508@bruchez.org>
To: www-forms@w3.org

Mark Birbeck wrote:
 > Hi John and Eric,
 >
 > I thought it would be a useful exercise to try to summarise in one
 > place everything that I could find on validation, from the 1.0 and
 > errata documents:
 >
 >   <http://www.xforms-wiki.com/bin/view/Main/EventXformsRevalidate>
 >
 > It would be helpful if anyone who is interested in this could cast
 > their eyes over it and see if there is anything that should be
 > added/removed/explained better, etc.

About 1.A:

   This is still a little arcane to me, let's see what the WG comes out
   with. Maybe a rationale and example would help?

About 1.B.a.I:

   "if true() the node must be non-empty, defined as follows:"

   Some meaning should be associated with "must be non-empty",
   i.e. what happens if it is not empty and it is required, i.e. the
   node is invalid.

   Maybe this should be clearly specified with an algorithm (like the
   algorithm for deferred update in the spec), where it would start
   with a boolean validity flag associated with the node, and explain
   what happens to that flag when going through the steps.

 > During the course of doing this, one thing jumped out which is that
 > the spec says events like xforms-readwrite, xforms-enabled and so
 > on, are dispatched during xforms-revalidate (see section 4.3.5, step
 > 3). However, the MIPs that correspond to these events are not
 > themselves calculated here, but in xforms-recalculate, so there is
 > no way that these events can be fired at this time. (Also, the event
 > is cancellable, which means you'd lose events like xforms-optional,
 > which have nothing to do with validity.)
 >
 > Probably another errata candidate? ;)

The spec mentions those events:

1. xforms-valid/xforms-invalid (constraint, type, required MIPs)
2. xforms-enabled/xforms-disabled (relevant MIP)
3. xforms-optional/xforms-required (required MIP)
4. xforms-readonly/xforms-readwrite (readonly MIP)

1) Is covered.

2) I don't know ;-)

3) xforms-optional and xforms-required can be dispatched for sure at
    this point, right?

4) Regarding calculate: I believe we don't need to actually perform a
    recalculation to determine whether we need to send xforms-readonly
    and xforms-readwrite: we just need to evaluate the calculate bind's
    nodeset attribute to identify which nodes are the targets of
    calculations, and which therefore become readonly by default. But
    maybe that's not what you had in mind.

-Erik
Received on Thursday, 9 June 2005 18:21:45 GMT

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