Custom Controls
PRELIMINARY INFORMATION - SUBJECT TO CHANGE
Release 2.1 - ...
The XForms language is extensible in many ways, since it fully supports XML namespaces.
Smartsite XForms comes with a number of extra, specialized controls which can be selected using the appearance attribute.
These controls live in the http://smartsite.nl/namespaces/xforms/controls/1.0 namespace.
For example, here's a document that shows a select element with the custom appearance 'cc:dual-list'.
| XML |
|
|---|---|
<?xml version="1.0" encoding="UTF-8"?>
<html (...) xmlns:cc="http://smartsite.nl/namespaces/xforms/controls/1.0"
>
(...)
<xf:select ref="data" appearance="cc:dual-list">
<xf:label>List</xf:label>
<xf:itemset nodeset="instance('lookup')//item">
<xf:label ref="." />
<xf:value ref="@nr" />
</xf:itemset>
</xf:select>
(...)
</html>
|
|
Using the appearance attribute keeps the XForms Documents portable, since other XForms implementations should ignore unrecognized appearances in custom namespaces.