xf:bind
element is used to point to data in the data model. It allows to associate with data:id
bind
attribute or the bind()
functionxf:constraint
, and 4.9 for other elements]type
, readonly
, required
, relevant
, calculate
, constraint
, and xxf:default
attributes, you can use nested elements:xf:type
xf:readonly
xf:required
xf:relevant
xf:calculate
xf:constraint
xxf:default
(see below)xf:type
(whose value is not an XPath expression but a type literal) have a value
attribute. The following binds are equivalent:readonly
, required
, relevant
, and constraint
rules (which are combined using either a boolean "or" or a boolean "and")xf:type
, xf:required
, and xf:constraint
).false
true
(depends on a series of conditions, including required
)true
false
some-node
's required property is here set to true, and the order of the two binds doesn't matter.xxf:bind()
function returns the node-set of a given bind.bind()
function since it is proposed for XForms 2.0.xxf:evaluate-bind-property()
function evaluates a property of a given bind.xxf:type()
function returns the type of the instance data node passed as parameter.<xf:bind>
element.xxf:custom-mips
is missing (see below), any attribute not in a standard Orbeon namespace is interpreted as a custom MIP:foo-bar-is-g
or foo-bar-is-not-g
.xxf:custom-mips
attribute, which lists the names of the custom MIPs in use. When this attribute is present, only the attributes with names listed are interpreted as MIPs. Other non-built-in attributes are ignored.xxf:custom-mips
attribute to specify which attributes are custom MIPs.xforms-submit-done
, xforms-model-construct-done
, or xforms-submit-ready
, which is sometimes cumbersome:xxf:default
. It works like the standard calculate
, except that it is evaluated only once, just before the first evaluation of the calculate
expressions if any.<xf:recalculate>
supports an extension attribute, xxf:defaults
, which, when set to true
, forces the re-evaluation of initial values before performing the recalculation.xxf:defaults
attribute is an AVT and can include XPath expressions between curly brackets:xxf:whitespace
MIP controls whitespace trimming. When the MIP is absent, there is no whitespace trimming.xxf:whitespace
can take one of two values:preserve
: there is no change to the value's whitespace (the default).trim
: leading and trailing whitespace is removed.trim
, all leading and trailing characters which are spaces, including non-breakable spaces, or ISO control characters, are removed.xxf:whitespace
processing takes place during XForms recalculate processing before xxf:default
and calculate
processing. This means that calculations have access to data which already had whitespace processed.xxf:default
and calculate
follows the xxf:whitespace
MIP. This means that at the time of revalidation and refresh, all values including calculated values have up to date whitespace.static
or dynamic
(the default). When using the value static
, read-only controls do not produce disabled HTML form controls. This has one major limitation: you can't switch a control back to being read-write once it is displayed as read-only.xxf:readonly-appearance
attribute directly on individual XForms controls.readonly
MIP in the model. By making for example the root element of an instance read-only, all the controls bound to any node of that instance will appear read-only (because the read-only property is inherited in an instance):