Hub Nexus
Atualizada

AutorAinda sem autorAssumir

Viu algo para melhorar? Proponha uma alteração.

Apoio

Em XForms · página 134 de 137

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.

Nestas publicaçõesXForms

IdiomasEnglish

Licença: CC BY-SA 4.0 · Adaptado de en.wikibooks.org

1

0

0

0

Spinner Logo

Comentários

Spinner Logo
Versão: 2CC0 1.0 — public domain
The runaway star that left the Tarantula Nebula
Versão: 2CC0 1.0 — public domain
The Blackwell School, where segregation had no law behind it
Versão: 2CC0 1.0 — public domain
The Eagle Nebula, seen in the infrared
Versão: 2CC0 1.0 — public domain
The house where the Equal Rights Amendment was written
Versão: 2CC0 1.0 — public domain
The Aleutians, the forgotten front of the Second World War
Versão: 2CC0 1.0 — public domain
The Cosmic Cliffs are not cliffs