<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="xhtml2.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 4: Processing Model</title></head>
<body>
<h>Chapter 4: Processing Model</h>
<section>
<h>Assertion no. 4.2.1-1</h>
<p>(must) if a model exists a xforms-model-construct is dispatched to the declaration element. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.1-2</h>
<p>pre: A model has a xsd:list of URI's pointing to accessible resources  (must) The resources identified by the URI's are loaded.  post: All the resources were loaded. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.1-3</h>
<p>pre: A model has a xsd:list of URI's pointing to resources where at least one resource is inaccessible.  (must) The resources identified by the URI's are loaded.  post: A xforms-link-exception event was dispatched to the model declaration element </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.1-4</h>
<p>pre: An valid external source for initial instance data is given.  (must) The external source is loaded and the xpath datamodel constructed  post: A XPath datamodel representing the initial instance data exists. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.1-5</h>
<p>pre: An inline initial instance data exist.  (must) A XPath datamodel is constructed using the initial instance data.  post: A XPath datamodel representing the initial instance data exists. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.1-6</h>
<p>pre: An inline initial instance data exist and an external source for initial instance data is given  (must) A XPath datamodel is constructed using the initial instance data in the external source.  post: A XPath datamodel representing the initial instance data from the external source exists. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.1-7</h>
<p>pre: neither inline initial instance data nor an external source for initial instance data is given.  (must) No processing.  post: No xpath datamodel exists. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.1-8</h>
<p>pre: No exceptions during processoing of xforms-model-construct event.  (must) A xforms-model-initialize event is dispatch to the model declaration element.  post: A xforms-model-initialize was dispatched to the model declaration element. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.2-1</h>
<p>pre: P3P is applicable  (must) P3P is initialized  post:  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.2-2</h>
<p>pre: P3P is applicable  (must) P3P is initialized  post:  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.3-1</h>
<p>pre: no exceptions were thrown during processing of xforms-model-initialize.  (must) No processing.   post: - </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.2-1</h>
<p>pre: xforms-intialize-done has been dispacthed on all model's declaration elements  (must) A xforms-ui-initialize is dispatched to each model  post: - </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.4-1</h>
<p>pre: controls bound to the model exists in the containing document  (must) A xforms-form-control-intialize is dispatched to each form control bound to the model   post: xforms-form-control-initialize event was dispatched to each form control bound to the model.  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-1</h>
<p>pre: The instance referenced by the form control existed when the first xforms-form-control-initialized was dispatched  pre: The node the binding expression is evaluated to does exist.  (must) The binding expression is evaluated.   post: The control references the evaluated node. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-2</h>
<p>pre: The instance referenced by the form control existed when the first xforms-form-control-initialized was dispatched  pre: The node the binding expression is evaluated to does not exist.  (must) The binding expression is evaluated.   post: The control references no node and behaves as if its referenced node had an model item relevant of value false. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-3</h>
<p>pre: The instance referenced by the form control did not exist.  pre: This is the first reference to the instance  (must) A default instance is created.  post: A default instance exists with the root element instanceData.  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-4</h>
<p>pre: The instance referenced by the form control did not exist.  pre: This is the first reference to the instance.  pre: A default instance with rootelement instanceData exists.  pre: The value of the binding expression is a valid QName.  (must) An element in the default instance is created.  post: A child element of the root element instanceData with the binding expression as the name eixts. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-5</h>
<p>pre: The instance referenced by the form control did not exist.  pre: This is the first reference to the instance.  pre: A default instance with rootelement instanceData exists.  pre: The value of the binding expression is not a valid QName.  (must) A xforms-binding-exception event is dispatched to the model declaration element.  post: The event xforms-binding-exception was dispatched to the model declaration element. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-6</h>
<p>pre: The instance referenced by the form control did not exist when the first xforms-form-control-initialze was dispatched.  pre: This is the second or subsequent reference to the instance.  pre: A default instance with rootelement instanceData exists.  pre: A matching *TBD* node exists in the created instance data  (must) Find the matching node of the created instance data.  post: The form control references that node. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-7</h>
<p>pre: The instance referenced by the form control did not exist when the first xforms-form-control-initialze was dispatched.  pre: This is the second or subsequent reference to the instance.  pre: A default instance with rootelement instanceData exists.  pre: A matching *TBD* node does not exists in the created instance data  pre: The value of the binding expression is a valid QName.  (must) An element in the default instance is created.  post: A child element of the root element instanceData with the binding expression as the name eixts. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.5-8</h>
<p>pre: The instance referenced by the form control did not exist when the first xforms-form-control-initialze was dispatched.  pre: This is the second or subsequent reference to the instance.  pre: A default instance with rootelement instanceData exists.  pre: A matching *TBD* node does not exists in the created instance data  pre: The value of the binding expression is not a valid QName.  (must) A xforms-binding-exception event is dispatched to the model declaration element.  post: The event xforms-binding-exception was dispatched to the model declaration element. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.2.6-1</h>
<p>pre: The xforms processor is shutting down.  pre: A model exits.  (must) A xforms-model-destruct event is dispatched to the model declaration element  post: A xforms-model-destruct was disptached to the declaration element. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.2-1</h>
<p>pre: xforms-focus is dispatched to a form control   (must) The focus is transferred to the form control.  post: The form control has focus. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.3-1</h>
<p>pre: xforms-help is dispatched to the form control.  pre: the form control has a help element.  (must) A message is constructed using the help element and presented to the user.  post: A help message is presented. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.3-2</h>
<p>pre: xforms-help is dispatched to the form control.  pre: the form control does not have a help element.  (should) A default help message is constructed using the help element and presented to the user.  post: A help message might be presented. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.3-3</h>
<p>pre: xforms-hint is dispatched to the form control.  pre: the form control has a hint element.  (must) A message is constructed using the hint element and presented to the user.  post: A hint message is presented. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.3-3</h>
<p>pre: xforms-hint is dispatched to the form control.  pre: the form control has a hint element.  (should) A default hint message is constructed using the hint element and presented to the user.  post: A hint message might be presented. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.4-1</h>
<p>pre: A request to update all form controls associated with a model has been issued.  (must) The user interface updates to reflect the current state of the model.  post: The user interface reflects the current state of the model. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-1</h>
<p>pre: A schema for the instance data exists.  pre: required, constraint, minOccurs and maxOccurs us not applied on any node.  (must) The instance is validated against the schema.  post: xforms-valid and xforms-invalid are dispatched to every form control referencing instance nodes in the model </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-2</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a required that evaluates to false exists.  pre: a form control referencing the bind exists.  pre: constraint, minOccurs and maxOccurs us not applied on any node.  (must) Required is evaluated.  post: xforms-valid was dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-3</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a required that evaluates to true exists.  pre: The instance node the bind references has no value.  pre: a form control referencing the bind exists.  pre: constraint, minOccurs and maxOccurs us not applied on any node.  (must) Required is evaluated.  post: xforms-invalid was dispatched to the form control.  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-4</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a required that evaluates to true exists.  pre: The instance node the bind references has a nonempty value (defined 6.1.3).  pre: a form control referencing the bind exists.  pre: constraint, minOccurs and maxOccurs us not applied on any node.  (must) Required is evaluated.  post: xforms-valid was dispatched to the form control.  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-5</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a constraint that evaluates to true exists,  pre: a form control referencing the bind exists.  pre: required, minOccurs and maxOccurs us not applied on any node.  (must) constraint is evaluated.  post: xforms-valid was dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-6</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a constraint that evaluates to false exists,  pre: a form control referencing the bind exists.  pre: required, minOccurs and maxOccurs us not applied on any node.  (must) constraint is evaluated.  post: xforms-invalid was dispatched to the form control.  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-7</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a minOccurs less than than the size of the nodeset  pre: a form control referencing the bind exists.  pre: required, constraint and maxOccurs us not applied on any node.  (must) minOccurs is evaluated  post: xforms-valid was dispatched to the form control.  </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-8</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a minOccurs larger than than the size of the nodeset  pre: a form control referencing the bind exists.  pre: required, constraint and maxOccurs us not applied on any node.  (must) minOccurs is evaluated  post: xforms-invalid was dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-9</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a maxOccurs larger than than the size of the nodeset  pre: a form control referencing the bind exists.  pre: required, constraint and minOccurs are not applied on any node.  (must) maxOccurs is evaluated  post: xforms-valid was dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-10</h>
<p>pre: A schema does not for the instance data exists.  pre: a bind with a maxOccurs smaller than than the size of the nodeset  pre: a form control referencing the bind exists.  pre: required, constraint and minOccurs are not applied on any node.  (must) maxOccurs is evaluated  post: xforms-invalid was dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-11</h>
<p>pre: xforms-revalidate is dispacthed to the model   (must) validation is done  post: xforms-invalid or xforms-valid was dispatched to every form control referencing nodes in that model.. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.5-12</h>
<p>pre: xforms-revalidate is dispatched to the model   pre: xforms-ui-initialized has not been dispatched.  (must) validation is done  post: xforms-invalid or xforms-valid are not dispatched. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.6.1</h>
<p>pre: expressions exists that are not computational dependent on a node x  pre: the value of node x is changed  (must) recalculation is done.  post: No expressions is calculated. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.6.2</h>
<p>pre: expressions exists that are computational dependent on a node x  pre: the value of node x is changed  (must) recalculation is done.  post: each expression that are dependent on node x is calculated once. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.6.3</h>
<p>(must) The computes needs to be computed in topological order of their dependencies. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.6.4</h>
<p>pre: Computational expression marked for recalculation exists.  (must) Every marked expression is computed in topological order of their dependencies.  post: The state of the model is reflects the computations (and no recalculcation marks exists) </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.6.5</h>
<p>pre: a compute has circular dependices.  (must) report an exception  post: the xforms-compute-exception was dispatched on the model element. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.7.1</h>
<p>pre: xforms-rebuild is dispatched to model   (must) builts the dependency datastructure  post: the dependecy datastructure was built and all instance nodes that have associated computational expression is marked for recalcalculation, </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.7.1</h>
<p>pre: xforms-rebuild is dispatched to model   (must) builts the dependency datastructure  post: the dependecy datastructure was built and all instance nodes that have associated computational expression is marked for recalcalculation, </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.3.8.1</h>
<p>pre: xforms-reset is dispatched the model  (must) The instance data is reset to the state it had after xforms-initialize-done  (must) xforms-rebuild, xforms-recalculate, xforms-revalidate and xforms-referesh are disptached to the model.  post: The instance reflects the initial state and the xforms-rebuild, xforms-recalculate , xforms-revalidate and xforms-refresh was dispatched in this order to the model. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.1-1</h>
<p>pre: default action request was issued on a form control.  (must) xforms-activate is dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.2-1</h>
<p>pre: An interactive change to an instance node bound to a form control with incremental set to true  (should) xforms-value-changing is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.3-1</h>
<p>pre: A confirmed change to a instance node bound to a form control with incremental set to true  (must) xforms-value-change is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.4-1</h>
<p>pre: An item in a select or select1 is selected  (must) The xforms-select is dispatched to the item declaration element </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.4-2</h>
<p>pre: An item in a select or select1 is deselected  (must) The xforms-deselect is dispatched to the item declaration element </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.4-3</h>
<p>pre: A case is selected  (must) the xforms-select is dispatched to the case declaration element </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.4-3</h>
<p>pre: A case is deselected  (must) the xforms-deselect is dispatched to the case declaration element </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.5-1</h>
<p>pre: The repeat view scrolls beyond the beginning of the repeat items  (must) the xforms-first is dispatched </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.5-2</h>
<p>pre: The repeat view scrolls beyond the end of the repeat items  (must) the xforms-last is dispatched </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.6-1</h>
<p>pre: The insert action is invoked succesfully. (even though the spec. does not make this distinction)  (must) xforms-insert is dispatched to the instance.   post: the xforms-insert event with context-info of the xpath expression used for insert </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.6-2</h>
<p>pre: The delete action is invoked succesfully. (even though the spec. does not make this distinction)  (must) xforms-delete is dispatched to the instance.  post: the xforms-delete event with context-info of the xpath expression used for delete </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.7-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-revalidate processing has concluded with the instance data node being valid  (must) either a xforms-valid is dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.8-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-revalidate processing has concluded with the instance data node being invalid  (must) either a xforms-invalid is dispatched to the form control. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.9-1</h>
<p>pre: A form control has received focus  (must) DOMFocusIn is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.10-1</h>
<p>pre: A form control losing focus  (must) DOMFocusOut is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.11-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-calculate processing has concluded with the instance data node property readonly evaluating to true  (must) xforms-readonly is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.12-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-calculate processing has concluded with the instance data node property readonly evaluating to false  (must) xforms-readwrite is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.13-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-calculate processing has concluded with the instance data node property required evaluating to true  (must) xforms-required is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.14-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-calculate processing has concluded with the instance data node property required evaluating to false  (must) xforms-optional is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.15-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-calculate processing has concluded with the instance data node property relevant evaluating to true  (must) xforms-enabled is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.16-1</h>
<p>pre: A form control bound to an instance data node exists  pre: xforms-calculate processing has concluded with the instance data node property relevant evaluating to false  (must) xforms-disbaled is dispatched to the form control </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.17-1</h>
<p>pre: A submission has been successfully completed  (must) xforms-submit-done is dispatched to the submission </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.4.18-1</h>
<p>pre: A submission failed to complete  (must) xforms-submit-error is dispatched to the model. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.5.1-1</h>
<p>pre: An illegal binding expression exists.  (must) xforms-binding-exception is dispatched to the model  post: processing halted. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.5.1-2</h>
<p>pre: a model attribute fails to point the ID of a model  (must) xforms-binding-exception is dispatched to the default model  post: processing halted. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.5.1-3</h>
<p>pre: a bind attribute fails to point at the ID of a bind  (must) xforms-binding-exception is dispatched to the default model  post: processing halted. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.5.2-1</h>
<p>pre: Failure in link traversal of a linking atribute  (must) xforms-link-exception is dispatched to the model.  post: the context info of the event is the URI that failed to load.  post: processing halted. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.5.3-1</h>
<p>pre: Failure in link traversal of a linking atribute in a situation not critical to form processing  (must) xforms-link-error is dispatched to the model.  post: the context info of the event is the URI that failed to load. </p>
<nl></nl></section>
<section>
<h>Assertion no. 4.5.4</h>
<p>pre: if an invalid paramter is passed to a xforms function  (must) xforms-compute-exception  post: processing halted. </p>
<nl></nl></section></body></html>