HOME

TheInfoList



OR:

XForms is an
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
format used for collecting inputs from web forms. XForms was designed to be the next generation of
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaS ...
/
XHTML Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated. While HTML, prior ...
forms, but is generic enough that it can also be used in a standalone manner or with presentation languages other than XHTML to describe a user interface and a set of common
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpret ...
manipulation tasks. XForms 1.0 (Third Edition) was published on 29 October 2007. The original XForms specification became an official
W3C Recommendation The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working t ...
on 14 October 2003, while XForms 1.1, which introduced a number of improvements, reached the same status on 20 October 2009.


Differences from web forms

In contrast to the original web forms (originally defined in HTML), the creators of XForms have used a
model–view–controller Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of info ...
(MVC) approach. The model consists of one or more XForms models describing form data, constraints upon that data, and submissions. The view describes what controls appear in the form, how they are grouped together, and what data they are bound to.
CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone technolo ...
can be used to describe a form's appearance. An XForms document can be as simple as a web form (by only specifying the submission element in the model section, and placing the controls in the body), but XForms includes many advanced features. For example, new data can be requested and used to update the form while it is running, much like using
XMLHttpRequest XMLHttpRequest (XHR) is an API in the form of an object whose methods transfer data between a web browser and a web server. The object is provided by the browser's JavaScript environment. Particularly, retrieval of data from XHR for the purpos ...
/
AJAX Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Gree ...
except without scripting. The form author can validate user data against
XML Schema An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constra ...
data types, require certain data, disable input controls or change sections of the form depending on circumstances, enforce particular relationships between data, input variable length arrays of data, output calculated values derived from form data, prefill entries using an XML document, respond to actions in real time (versus at submission time), and modify the style of each control depending on the device they are displayed on (desktop browser versus mobile versus text only, etc.). There is often no need for any scripting with languages such as JavaScript. However, XForms does include an event model and actions for implementing more complex form behaviors. Actions and event handling are specified using the XForms XML dialect rather than more common scripting languages like JavaScript. Like web forms, XForms can use various non-XML submission protocols ( multipart/form-data, application/x-www-form-urlencoded), but a new feature is that XForms can send data to a server in XML format. XML documents can also be used to prefill data in the form. Because XML is a standard, many tools exist that can parse and modify data upon submission. Similar tools for legacy forms also exist. XForms is itself an XML dialect, and therefore can create and be created from other XML documents using
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subseq ...
. Using transformations, XForms can be automatically created from
XML schema An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constra ...
s, and XForms can be converted to XHTML forms.


Software support

At the time of this writing, no widely used
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used o ...
supports XForms natively. However, various browser plugins, client-side extensions and server/client solutions exist. The following lists some implementations: * The
Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current ...
XForms extension was part of the Mozilla Project. XForms 1.0 SE support is not complete but covers most of the specification with a notable exception of attribute-based repeating used in HTML tables. The extension was available for both Firefox 2 and Firefox 3, but is not upgraded to support Firefox 4 and higher. In July 2011 the lead developer wrote that XForms support would no longer get updated. Support for XForms was eventually deprecated in Firefox 19. * IBM Lotus Forms supports development and deployment of XForms-based pure XML forms. Trial downloads are available of an Eclipse-based visual design environment and a client-side viewer that can run XForms-based forms both in the web browser and as a standalone desktop application. *
OpenOffice.org OpenOffice.org (OOo), commonly known as OpenOffice, is a discontinued open-source office suite. Active successor projects include LibreOffice (the most actively developed), Apache OpenOffice, Collabora Online (enterprise ready LibreOffice) a ...
versions 2.0 and greater and
LibreOffice LibreOffice () is a free and open-source office productivity software suite, a project of The Document Foundation (TDF). It was forked in 2010 from OpenOffice.org, an open-sourced version of the earlier StarOffice. The LibreOffice suite co ...
support XForms.


Implementation technologies compared

FormFaces, AJAXForms, XSLTForms, betterFORM, Chiba, Orbeon and Smartsite Forms are based on Ajax technology. The amount of server-side and client-side processing varies between these implementations. For example, Ubiquity XForms, FormFaces and XSLTForms provide 100% XForms client-side processing and data model updates via pure Ajax processing on the XForms standard. The others use server-side Java/.NET XForms processing transcoding to Ajax markup prior to delivering the content to the browser. Both techniques can work across browsers. Each implementation is significantly different with respect to dependencies, scalability, performance, licensing, maturity, network traffic, offline capability, and cross browser compatibility. System architects should evaluate these constraints against their needs to determine potential risks and objectives. Plugins like FormsPlayer and other client-side technology can have some benefits as well: because they integrate themselves into the browser, they will work with existing server architectures, can be more responsive, and require fewer server fetches. The tradeoff between server-side and client plug-in solutions is where the software is maintained; either each client must install the required plug-in, or the server architecture must change to accommodate the XForms transcoder engine language technology. It is in theory possible to mix both of these solutions, for instance testing the browser for a client-side XForms implementation and serving native XForms in that case, and defaulting to a server solution in other cases. Ubiquity XForms, FormFaces and XSLTForms provide a "zero software" solution on either the client or server: no new software needs to be installed on the client and the solution can be used in conjunction with any server-side architecture. This is possible because FormFaces and Ubiquity XForms are written 100% in Ajax and because XSLTForms is written in XSLT and in Ajax. The tradeoff is that compared to other solutions, more code is initially downloaded to the client (code can be cached on the client), and FormFaces does not yet support XML Schema validation. Furthermore, XForms submissions with replace "all" behaviour will typically not result in true page replacements and therefore break the normal back button behaviour.


XRX application architecture

Because XForms makes it easy to edit complex XML data there are many advantages to using XForms with native XML databases that frequently leverage
REST Rest or REST may refer to: Relief from activity * Sleep ** Bed rest * Kneeling * Lying (position) * Sitting * Squatting position Structural support * Structural support ** Rest (cue sports) ** Armrest ** Headrest ** Footrest Arts and enter ...
interfaces. The combination of three technologies (XForms on the client, REST interfaces and
XQuery XQuery (XML Query) is a query and functional programming language that queries and transforms collections of structured and unstructured data, usually in the form of XML, text and with vendor-specific extensions for other data formats (JSON, b ...
on the server) is collectively known as XRX application development. XRX is known for its simple architecture that uses XML both on the client and in the database and avoids the transformations to object or relational data structures. See
XRX:Simple, Elegant, Disruptive
.


XForms for mobile devices


Benefits

XForms provides specific benefits when used on mobile devices: * User interfaces using XForms require fewer round trips with the server and are in that sense more self-contained than user interfaces using HTML 4 forms. * Capabilities of mobile devices vary greatly; consequently the amount of the work involved in generating different user interfaces for different devices is of particular concern in the mobile world. XForms has been designed from the ground up to allow forms to be described independently of the device, which reduces the amount of work required to target multiple devices. * XForms reduces the need for JavaScript, which is particularly interesting as JavaScript support varies greatly on mobile devices and cannot be widely relied upon. This also allows systems on which JavaScript is disabled for security concerns to continue to operate flawlessly.


Implementations


ODK

ODK is an open-source mobile data collection platform that uses a subset of W3C XForms 1.0 called ODK XForms. ODK provides ODK XForms processing libraries in Java
JavaRosa
and JavaScript
enketo-core
.


Xfolite

Xfolite
is a light-weight XForms client for the J2ME platform. It was originally created at Nokia Research Center, and it includes a DOM and XPath 1.0 implementation as well as an XForms engine that implements the XForms 1.1 specification almost completely. XFolite was released as beta software and should not be considered ready for production use as such. However, it does contain a mature XForms engine that has been designed to work with different UI implementations. XML Schemas and CSS are outside project scope, however. Xfolite is open source and licensed under the LGPL license, but is not being actively developed further.


See also

* InfoPath Forms Services * FormFaces


References


XForms 1.1 - W3C Recommendation 20 October 2009
* *


External links

* XForms Resources at W3C *
The XForms Users Community Group
*

*
XForms 1.1
was
W3C Recommendation on 20 October 2009
*
XForms 2.0 Working Draft
*
XForms 2.0: XPath Expressions Module
** A quick introduction t

by
Steven Pemberton Steven Pemberton is a researcher affiliated with the Distributed and Interactive Systems group at the Centrum Wiskunde & Informatica (CWI), the national research institute for mathematics and computer science in the Netherlands. He was one of t ...
*
XForms 1.1 Quick Reference
*
XForms Implementations
*
The Forms Working Group
(historical interest) ** XForms 1.0 (Third Edition) was
W3C Recommendation on 29 October 2007
*


Smartsite XForms
{{DEFAULTSORT:Xforms World Wide Web Consortium standards XML-based standards User interface markup languages