<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.w3.org/MarkUp/Forms/Group/Test/xhtml2.css" ?>
<!-- no doctype yet, but the id attribute needs to be of type ID, 
so the id (#) syntax works in CSS -->
<!DOCTYPE html [
	<!ATTLIST section id ID #IMPLIED>
	<!ATTLIST h       id ID #IMPLIED>
	<!ATTLIST div     id ID #IMPLIED>
	<!ATTLIST nl      id ID #IMPLIED>
]>
<html xmlns="http://www.w3.org/2002/06/xhtml2" lang="en">
<head>
<title>Chapter 10: Actions</title></head>
<body xml:base="http://www.w3.org/MarkUp/Forms/Group/Drafts/Sources/index-all.html">
<h>Chapter 10: Actions</h>

<section>
<h href="#id2637243">10.1 The XForms Action Module</h>
<p class="MUST UA">Actions an implementation does not recognize should be silently ignored.</p>

<section>
<h href="#action-action">10.1.1 The action Element</h>
<p class="MUST UA">If an ev:event attribute is specified on the action element, the action is triggered when the corresponding event is targeted at its parent (this is XML Events)</p>
<p class="MUST UA">Children of the action element are processed in sequence, with each action completing before the next begins.</p>
<p class="MUST UA">At the end of processing the &lt;action&gt; element, the UI and instance MUST be completely up to date.</p>
<p class="MUST UA">rebuild actions must be processed immediately.</p>
<p class="MUST UA">If a rebuild is flagged to occur and the rebuild action is processed, the rebuild action MUST NOT occur at the end of &lt;action&gt; processing.</p>
<p class="MUST UA">recalculate actions must be processed immediately.</p>
<p class="MUST UA">If a recalculate is flagged to occur and the rebuild action is processed, the rebuild action MUST NOT occur at the end of &lt;action&gt; processing.</p>
<p class="MUST UA">revalidate actions must be processed immediately.</p>
<p class="MUST UA">If a revalidate is flagged to occur and the rebuild action is processed, the rebuild action MUST NOT occur at the end of &lt;action&gt; processing.</p>
<p class="MUST UA">refresh actions must be processed immediately.</p>
<p class="MUST UA">If a refresh is flagged to occur and the rebuild action is processed, the rebuild action MUST NOT occur at the end of &lt;action&gt; processing.</p>
<p class="MUST UA">When the insert action has been processed, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur until &lt;action&gt; processing concludes, at which time the actions MUST occur.</p>
<p class="MUST UA">When the delete action has been processed, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur until &lt;action&gt; processing concludes, at which time the actions MUST occur.</p>
<p class="MUST UA">When the setvalue action has been processed, the recalculate,revalidate, and refresh actions MUST NOT occur until &lt;action&gt; processing concludes, at which time the actions MUST occur.</p>
<p class="MUST UA">When the setvalue action has been processed, the rebuild action MUST NOT occur.</p>
<p class="MUST UA NOTE">When the setindex action has been processed, the recalculate,revalidate, and refresh actions MUST NOT occur until &lt;action&gt; processing concludes, at which time the actions MUST occur.</p>
<p class="MUST UA">When the setindex action has been processed, the rebuild action MUST NOT occur.</p>
<p class="MUST UA">reset actions must be processed immediately.</p>
<p class="MUST UA">If a rebuild,recalculate,revalidate or refresh is flagged to occur and the reset action is processed, the flagged actions MUST NOT occur at the end of &lt;action&gt; processing.</p>
<p class="MUST UA NOTE">If a toggle action causes a rebuild,recalculate,revalidate, or refresh then SOMETHING SOMETHING SOMETHING</p>
<p class="MUST UA">When the dispatch action is processed, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur.</p>
<p class="MUST UA">When the setfocus action is processed, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur.</p>
<p class="MUST UA">When the load action is processed, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur.</p>
<p class="MUST UA">When the dispatch action is processed, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur.</p>
<p class="MUST UA">When the message action is processed, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur.</p>
<p class="MUST UA NOTE">When the send action is processed, and the current document is *not* replaced, the rebuild,recalculate,revalidate, and refresh actions MUST NOT occur at the end of &lt;action&gt; processing.</p>
<p class="MUST UA">&lt;action&gt; actions must be processed immediately.</p>
<p class="MUST UA">If a rebuild,recalculate,revalidate or refresh is flagged to occur and a child &lt;action&gt; is processed, the flagged actions MUST NOT occur at the end of the parent's action processing.</p>
</section>


<section>
<h href="#action-dispatch">10.1.2 The dispatch Element</h>
<p class="MUST UA">dispatch actions with no name or with no target MUST be ignored.</p>
<p class="MUST UA">XForms events MUST be fired.</p>
<p class="MUST UA">Events MUST not prepend "xforms-" to the event name when firing.</p>
<p class="MUST UA">For XForms events, the bubbles and cancelable attributes MUST be ignored.</p>
<p class="MUST UA">Non-XForms events MUST be fired.</p>
<p class="MUST UA">For Non-XForms events, the bubbles and cancelable attributes MUST be honored.</p>
<p class="MUST UA">Non-existent targets MUST be ignored.</p>
</section>


<section>
<h href="#action-rebuild">10.1.3 The rebuild Element</h>
<p class="MUST UA">rebuild actions with no model attribute or whose specified model does not exist MUST be ignored.</p>
<p class="MUST UA">The rebuild action MUST dispatch a rebuild event to the specified model.</p>
</section>


<section>
<h href="#action-recalculate">10.1.4 The recalculate Element</h>
<p class="MUST UA">recalculate actions with no model attribute or whose specified model does not exist MUST be ignored.</p>
<p class="MUST UA">The recalculate action MUST dispatch a recalculate event to the specified model.</p>
</section>


<section>
<h href="#action-revalidate">10.1.5 The revalidate Element</h>
<p class="MUST UA">revalidate actions with no model attribute or whose specified model does not exist MUST be ignored.</p>
<p class="MUST UA">The revalidate action MUST dispatch a revalidate event to the specified model.</p>
</section>


<section>
<h href="#action-refresh">10.1.6 The refresh Element</h>
<p class="MUST UA">refresh actions with no model attribute or whose specified model does not exist MUST be ignored.</p>
<p class="MUST UA">The refresh action MUST dispatch a refresh event to the specified model.</p>
</section>


<section>
<h href="#action-setfocus">10.1.7 The setfocus Element</h>
<p class="MUST UA">setfocus actions with no control attribute or whose specified control does not exist MUST be ignored.</p>
<p class="MUST UA">setfocus action must fire the xforms-focus event at the specified control.</p>
<p class="MUST UA">If a setfocus element is targeted at a &lt;repeat&gt; element or a descendant thereof, the xforms-focus event MUST be dispatched to the corresponding control in the repeat item at the current repeat index</p>
</section>


<section>
<h href="#action-load">10.1.8 The load Element</h>
<p class="MUST UA">load actions with no resource attribute and no (model+ref or bind) MUST be ignored.</p>
<p class="MUST UA">load actions with resource attribute *and* (model, ref or bind) MUST be ignored.</p>
<p class="MUST UA">load actions with resource attribute MUST load the resource.</p>
<p class="MUST UA">load actions with "bind"-specified resource pointed at no nodes MUST be ignored.</p>
<p class="MUST UA">load actions with "bind"-specified resource pointed at multiple nodes MUST load the resource specified in the first node.</p>
<p class="MUST UA">load actions with "ref"-specified resource pointed at no nodes MUST be ignored.</p>
<p class="MUST UA">load actions with "ref"-specified resource pointed at multiple nodes MUST load the resource specified in the first node.</p>
<p class="MUST UA">load actions with a failed link MUST fire the xforms-link-error event with the resource URI in it.</p>
<p class="MUST UA">load actions with show="new" MUST NOT replace the current document with the new link and MUST show the new document somewhere else.</p>
<p class="MUST UA">load actions with show="replace" MUST replace the current document with the new link.</p>
<p class="MUST UA">load actions with no show attribute MUST be treated as "replace".</p>
</section>


<section>
<h href="#action-setvalue">10.1.9 The setvalue Element</h>
<p class="MUST UA">setvalue actions with no model+ref or bind attribute MUST be ignored.</p>
<p class="MUST UA">setvalue actions pointed at an element with no text node child MUST create a textnode with the specified value as the first child of the element.</p>
<p class="MUST UA">setvalue actions pointed at an element with multiple text node children MUST replace the first textnode with the specified value.</p>
<p class="MUST UA">setvalue actions pointed at an attribute MUST set the attribute's value to the specified value.</p>
<p class="MUST UA">setvalue actions pointed at a textnode MUST replace the textnode with the specified value</p>
<p class="MUST UA">setvalue actions with no value attribute and no text MUST set the corresponding node to "".</p>
<p class="MUST UA">setvalue actions with text and no value attribute MUST set the corresponding node to the text.</p>
<p class="MUST UA">setvalue actions with value attribute and no text MUST set the corresponding node to the value.</p>
<p class="MUST UA">setvalue actions with value attribute and text MUST set the corresponding node to the value.</p>
<p class="MUST UA">setvalue actions with model+ref pointed at no nodes MUST set the corresponding node to the value.</p>
<p class="MUST UA">setvalue actions with model+ref pointed at multiple nodes MUST set the first node in the set to the value.</p>
<p class="MUST UA">setvalue actions with bind pointed at no nodes MUST set the corresponding node to the value.</p>
<p class="MUST UA">setvalue actions with bind pointed at multiple nodes MUST set the first node in the set to the value.</p>
</section>


<section>
<h href="#action-submit">10.1.10 The send Element</h>
<p class="MUST UA">send action must fire the xforms-submit event at the specified submission.</p>
</section>


<section>
<h href="#action-reset">10.1.11 The reset Element</h>
<p class="MUST UA">reset actions with no model attribute or whose specified model does not exist MUST be ignored.</p>
<p class="MUST UA">reset action must fire the xforms-reset event at the specified model.</p>
</section>


<section>
<h href="#action-info">10.1.12 The message Element</h>
<p class="MUST UA">message actions with no [resource|src] and no bind/ref/model and no text MUST be ignored.</p>
<p class="MUST UA">message actions with no level MUST be ignored.</p>
<p class="MUST UA">message actions with a failed [resource|src] link MUST fire the xforms-link-error event with the [resource|src] URI in it.</p>
<p class="MUST UA">message actions with [resource|src] link MUST display the message.</p>
<p class="MUST UA">message actions with bind/ref/model link MUST display the message.</p>
<p class="MUST UA">message actions with textnode link MUST display the message.</p>
<p class="SHOULD UA">message actions with level="ephemeral" SHOULD allow processing to continue immediately and SHOULD NOT require user interaction to remove the disruption from the user's experience.</p>
<p class="SHOULD UA">message actions with level="modeless" SHOULD allow processing to continue immediately.</p>
<p class="SHOULD UA">message actions with level="modal" SHOULD NOT allow processing to continue until the user has explicitly agreed to continue.</p>
<p class="MUST UA">message actions with level values that are recognized by the user agent MUST be ignored.</p>
</section>

</section>

<p>NOTE: anyAttribute needs to be tested somewhere</p>
<p>NOTE: that unrecognized event types should not cause problems for actions!</p>
</body>
</html>
