Search This Blog

Tuesday, October 30, 2007

Extending XForms to Enable Rich Text Editing

XForms provides a strict processing model for XML content. The XForms
standard defines controls (text input, combo boxes, text areas, and
more) that allow for editing text within a given XML element or
attribute. Using the proliferation of rich text editing across many
Web-based applications (such as e-mail, blogs, and wikis), the XForms
set of controls can be expanded to accommodate this. This article
shows to extend the standard XForms set of controls to provide this
rich text editing. There are many HTML and ECMAScript rich text
editors for HTML content;for the purposes of this article, we use
Dojo, and provide a sample using FCKEditor as well. Since we require
XForms and a rich text editor, we also need a mechanism to bind the
editor's content to an XForm's instance. This could be accomplished
by writing a bunch of JavaScript or using another technology for
binding user instance controls, called XML Binding Language (XBL).
Mozilla XForms provides a way of extending existing user interface
controls using XBL, which also makes this choice desirable. By
following some of the integration rules defined by XForms, XBL, and
a rich text editor, the end result is a simple and powerful addition
to the XForms set of controls. This can further enable the application
of XForms in a variety of applications, such as blogs, e-mails, social
networking sites, and more. These can then leverage the built-in
capabilities of XForms for validation, XML submission, declarative
programming, and more. More Information See also XML and Forms: Click Here

No comments: