In the previous article, I showed you how to manage user input in the XForms model. I discussed the process of submitting an XForm and – more importantly - validating user input prior to submission using built-in XML Schema support. In this concluding article, find out how to use the <xforms:bind> element to perform calculations on form input values, integrate XPath expressions into your XForms model and get a crash course in the XForms event model.
And that's about all I have for you. Over the course of this three-part tutorial, I introduced you to the new XForms 1.0 specification, and showed you how to create a data model and bind its elements to form input controls. I also explained the various XForms input controls, and showed you how they map into the standard HTML form controls.
Next, I discussed the process of submitting an XForm, with a look at the <xforms:submission> element and the "submit" input control. I also showed you how to perform primitive datatype validation in an XForm using built-in XML Schema datatypes, and how to extend this to perform more complex validation by integrating your own custom datatypes into the XForms model.
I hope you enjoyed this article, and that it gave you sufficient grounding to get you started with XForms. XForms is one of the more interesting emerging XML technologies, and you can expect to see it grow more powerful in subsequent iterations. So go on - it's time to practice!
Note: Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article.