The output element

Release 2.0 - ...

This form control renders content based in part on instance data, but it provides no means for entering or changing data.

This element is usually rendered as an (x)html div or span element.

Example

XML CopyCode image Copy Code
<xforms:output ref="/order/item/discount">
   <xforms:label>Discount : </xforms:label>
</xforms:output>

Attributes

Name Required / optional Description
appearance | class (see UI Common Attributes) optional Only the appearance and class attributes from the UI Common Attributes group are allowed.
value optional An XPath expression to be evaluated. The string result of the evaluation is rendered by the form control.
If binding attributes are present to select a node, this attribute has no effect.
mediatype optional String value to indicate that data obtained from the Single Node Binding should be rendered according to a desired mediatype,
such as image/* for image rendition. If the mediatype element appears as a child of the output element, then it overrides this attribute.
Common Attributes optional Any attribute from the Common Attributes collection (e.g. id).
Single Node Binding Attributes optional One or more attributes from the Single Node Binding Attributes group (ref, model, bind).
Linking Attributes optional Any attribute from the Linking Attributes group (e.g. src).

Content

Within an output element, the following child elements are allowed:

Element Name Required / optional Description
label required Provides a descriptive label for the containing form control
help optional Provides a help message for the containing form control.
hint optional Provides a hint message for the containing form control.
alert optional Provides an alert or error message for the containing form control.
Action element(s) optional Any element from the Action Elements Collection.
mediatype optional The mediatype element can be used as alternative to the mediatype attribute.

Specification

Link to the XForms specification: the output element

Topics