Skip to content
Hub Nexus

No author yetClaim it

Version 1Updated 2 min read

Support

Motivation

You want to generate a user interface form directly from a model.

Method

Because XForms is a declarative XML file it can be generated by transforming a model of your data directly into a form. The most common way to store a model of hierarchical data is using an XML Schema. A server-side program will scan the XML Schema document and for each element found it will create the appropriate XForms elements.

Generated forms have the advantage over hand-crafted forms in that they can can be generated with the same set of transforms. If you change your form standards all the forms can be quickly be regenerated. Many of these advantage can be gained by pushing the formatting and layout functionality of a form into CSS style sheets. But there are also many aspects of a form that are not governed by a style sheet.

If you using a consistent naming convention in your forms you can also use this naming convention to decide what types of input controls to generate based on the information in the element name. For example simple names and amounts will map to input controls, boolean true/false values will map to inputs formatted as checkboxes, dates will use calendar selectors, text objects will use textarea controls and codes will use select or select1 controls.

Here is a sample of how ISO Data element Representation Terms map to XForms controls:

Representation TermXForms Control
Amount, Nameinput
Indicatorinput with type="xs:boolean"
Dateinput with type="xs:date"
TextTextarea

Where this page came from

This page was imported from Wikibooks. From “XForms” on Wikibooks, by its contributors, under CC BY-SA 4.0. Changed here: set as a page; navigation and edit links left out; each image under its own licence, credited in its caption.

Nobody has written it yet — it is the source material at a new address, which is why search engines are asked to skip it and why no one earns from it. It is up for grabs: take it on, and it is yours to rewrite and to earn from.

Get each new page of

XForms

Following means one email when a page is added, nothing when a page changes.

Following means one email when a page is added, nothing when a page changes.

Comments

Spinner Logo

Next in XForms

CC BY-SA 4.0
If you are a newcomer to XForms and you are having problems debugging XForms you are not alone. XForms debugging can be tricky especially for newcomers. If you follow the newsgroups on XForms you will see several problems come up frequently. ## Common Problems These problems, roughly sorted in terms
CC BY-SA 4.0
This cookbook identifies example programs that demonstrate best practices. An XForms Best Practice is a specific way of solving a general problem that has been selected from among posible solutions by various authors. There are a variety of reasons for best practices but in general best practices in
CC BY-SA 4.0
If you are a newcomer to XForms and you are having problems debugging XForms you are not alone. XForms debugging can be tricky especially for newcomers. If you follow the newsgroups on XForms you will see several problems come up frequently. ## Common Problems These problems, roughly sorted in terms
CC BY-SA 4.0
Here are some naming conventions used for this WikiBook. These naming conventions are designed to be consistent across the sample programs, allowing our students to be able to copy and paste blocks of code from the sample programs with a minimum amount of reformatting. So even though it may be a lit
CC BY-SA 4.0
At the end of the cookbook there are integration examples of how to extend and integrate XForms with other systems such as web services. The philosophy behind this book centers around the fact that people often learn best by taking a fully-functioning program and making slight modifications to it to
CC BY-SA 4.0
One thing is clear: the introduction of clean [MVC]( concepts were never part of the original HTML specification. Many attempts were made to introduce better controls into browsers and the HTML language, but most of these additions fell short for four reasons: - They were either browser or vendor sp