We conclude our description of the XForms architecture and its inner workings with a description of the events and event flow that define the XForms processing model. The normative definition of this processing model is given in the XForms Processing Model (XPM [1] ); that description has been written explicitly with implementors in mind to ensure interoperability.
The purpose of this chapter is to give a gentle introduction to the XForms processing model with a view to helping authors understand how they can leverage the XForms functionality in their own Web applications. To this end, we will cover only those aspects of the processing model that are most likely to be accessed by Web authors and point the XForms implementor and other interested readers to the XForms specification for the precise details. XForms markup and the processing that is applied to that markup have both been designed to be hosted within a variety of Web containers . We have used XHTML as the host markup language for many of the examples in this book. This aspect of hosting XForms markup describes only the syntax of XForms contained within XHTML documents. The behavior of such XHTML documents that host XForms constructs is defined by the model given in the standard DOM Level 2 Events specification and exposed to the XML author by module XML Events (see Section 2.3). Thus, to complete the picture regarding the behavior of XForms constructs hosted in a DOM2-compliant XHTML container, all that remains is a description of how these various XForms constructs interact with the DOM2 events flow implemented by standard XHTML-aware Web browsers. Thus, the description of the XForms Processing Model reduces to enumerating the following aspects of eventing in the context of XForms constructs:
We will organize the rest of this chapter by grouping XForms events based on when and how they are raised. Using this classification, XForms events can be grouped into the following classes:
|