This is an archived page. It's not actively maintained.

XForms Output Element


Serves to show the instance data that the element is bound to in a read-only manner (see the spec). To see how they work you can try an XHTML example or a XUL example.


  • UI Common
    • appearance - the value of this attribute gives a hint to the XForms processor as to which type of widget(s) to use to represent this control
    • accesskey - used to specify the keyboard shortcut for focusing this control
  • Single-Node Binding
  • Special
    • value - xpath expression whose evaluation result is used as the output's value. If binding attributes are present on the control then the value attribute is is ignored.

Type restrictions

The output element can be bound to a node containing simple content of any data type.


The XForms output element can be represented by the following widgets for the specified data types (or types derived from these data types):

  • text - default representation for instance data of most types, especially static text (xhtml/xul).
  • calendar - used to represent instance data of type date (xhtml/xul).
  • image - if the instance node contains an image, then an output element can be used in combination with the mediatype element to display the image (Fx 3.0 only, xhtml/xul).


Displaying the data as text is the default presentation. XForms output is most often used when a form author needs to render simple text of an instance node (xhtml/xul).


  • text is presented to the user when there is no type given for the bound node or a type is specified that is not handled by one of the other widgets (as documented below).
  • analogous widgets are <xhtml:span/> and <xul:description/>


A form author may notice a XForms output element represented by a calendar widget in the Mozilla XForms processor if the control meets the following criteria (xhtml/xul).


  • the bound instance node is of type xsd:date or a type derived from it
  • in addition, the appearance attribute must also contain the value "full"
  • firefox 2.0 doesn't currently have any similar widgets available for use with XHTML or XUL.


If the bound instance node contains an image then you are free to use this representation to show the image instead of the byte sequence of the image data (Fx 3.0 only, xhtml/xul).


  • the bound instance node is of type xsd:anyURI, xsd:base64Binary or a type derived from it
  • either the mediatype attribute is present and contains the image's mimetype or the output element contains a mediatype element which specifies the image's mimetype (for example, image/*).