Common Action Attributes
The Common Action Attributes group applies to all Action elements, described in the XForms Action Elements section.
if
Author-optional attribute containing an XPath expression which is evaluated before the action is executed.
If the converted result of the expression evaluates to false, then the action is not performed. If the converted result is true, then the action is performed.
If this attribute is applied to an XForms action element and the converted result of evaluation is false, then all of the actions within the action element are omitted from the execution of the XForms action sequence that invoked the action element. If the result is true, then the contained actions are performed according to the normal processing rules such as deferred update behavior and applicability of conditional and iterative attributes.
while
Author-optional attribute containing an XPath expression which is evaluated before the action is executed.
If the converted result of the expression is true, then the XForms action is performed and then the expression is re-evaluated.
The XForms action is executed repeatedly until the converted result of the expression evaluates to false.
If this attribute is applied to an XForms action element, then the sequence of XForms actions in its content are executed repeatedly once for each time the immediately preceding evaluation of the expression yields a result of true.
When XForms actions are iteratively executed, they are still subject to the normal action processing rules such as deferred update and applicability of conditional and iterative attributes.
An XForms action may be executed zero times due to this attribute. Furthermore, if an action bears this attribute and the if attribute, then the expressions of both attributes must evaluate to true before each iterative execution of the action.