The mighty appearance Attribute
The XForms standard defines the appearance attribute to allow XForms authors to pass a hint to the XForms processor to select one of potential several different renderings of the given control. So for instance a xf:select1 might be rendered as a group of radio buttons or as a combo box depending on the choosen appearance.
There are three predefined appearance values (minimal | compact | full) mentioned in the Xforms Spec plus the option to add your own ones with qualified name e.g.
<xf:switch appearance=“dijit:tabContainer“ …
‘dijit:tabContainer’ is a custom extension which is only available in betterFORM and will be rendered as a Dojo TabContainer.
A XForms processor is free to choose the most appropriate rendering though the Spec gives some hints how to interpret the values of the appearance attribute for certain controls. The reference forms found in the betterFORM distribution show which values for appearance are available for a given control and how the final rendered results looks like.
In betterFORM the appearance is not only supported for controls but is also interpreted for group, repeat and switch. This is a very quick way to choose between some basic layout options. Again these layout alternatives can be studied best in our reference forms that are found in ‘forms/reference’ in the distribution.