Chapter 20. XForms

XForms is an XML-based forms technology specified by the World Wide Web Consortium (W3C). XForms' initial intent was to replace HTML forms, which are now at least a decade old. The power and flexibility of XForms goes well beyond this initial goal, and XForms is well suited to be used as a general-purpose tool for designing user interfaces for Web applications.

In several earlier chapters, you learned how to manipulate XML using technologies such as XPath, XSLT, XQuery, and the XML DOM, but you have yet to discover how to collect data to form part of an XML-based workflow. XForms is an important tool in the XML developer's toolbox, because XForms submits data from forms as well-formed XML documents.

Forms are an integral part of day-to-day business activity. Filling in paper forms or electronic forms is almost inescapable for anyone who is an information worker. As XML-based workflows become more prevalent in large enterprises and progressively trickle down into smaller businesses, the advantages of submitting XML data will become more widely appreciated.

XForms isn't the only XML-based forms tool, and although the main focus of this chapter is XForms, other proprietary solutions to XML-based forms are described briefly toward the end of the chapter.

This chapter covers the following:

  • How XForms improves on existing HTML forms technology

  • The state of the main XForms implementations

  • How the XForms model is created, including a discussion and examples of using the xforms:model, ...

Get Beginning XML, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.