Hi,
The attached XForms document demonstrates a bug that occurs in a rare
set of conditions.
(1) The instance "result" holds a value controlled by an XForms
control. It may be invalid when the XForms document is loaded (in the
MWE, it is forced to be invalid).
(2) Its invalidity causes an xforms-out-of-range exception on its
select1 control.
(3) The xforms-out-of-range exception causes a submission event, which
loads a temporary instance with a default value
(4) after the submission, the default value is copied into the result
instance. That should make the result instance valid.
Step (4) is the actual bug I'm trying to diagnose but I can't find an
MWE that reproduces it exactly.
This minimum working example shows a slightly different, but possibly
related bug: In this case, step (3) happens and the setvalue occurs but
the control is not updated to reflect the change in value of
instance('result')/id
Directly loading the value using xf:setvalue without a submission in
between works as expected.
In the latter case, the xforms-recalculate, xforms-revalidate, and
xforms-in-range events are sent after the xf:setvalue; in the former
case, they are not. (In the bug I'm really aiming at, xforms-in-range
occurs and the control's state is updated, but the control remains
invalid until another control is updated).
It does not matter whether the xf:setvalue is in a handler for
xforms-out-of-range or the submission's xforms-submit-done
I'm using XSLTForms dataisland branch r479, running under eXist 1.5.
I've tried this on Firefox 3.6 and Google Chrome 9.0 under Linux.
Thanks,
--
---
Efraim Feinstein
Lead Developer
Open Siddur Project
http://opensiddur.net
http://wiki.jewishliturgy.org
|