XForms Range Element

Introduction

Allows the user to choose a value from within a specific range of values (see the spec).

Attributes

  • UI Common
    • appearance - isn't supported.
    • accesskey - used to specify the keyboard shortcut for focusing this control.
  • Single-Node Binding
  • Special
    • incremental - supported, default value is false
    • start - lower bound of possible values
    • end - upper bound of possible values
    • step - is used for incrementing/decrementing values

Start/end/step attributes

If the value of the bound instance node is outside the range of values specified by the start and end attributes, then the range element receives a xforms-out-of-range event. If the bound value then becomes in range, the range element receives a xforms-in-range event.

start

Specifies the lower bound of possible values, i.e. values can't be less than the value of this attribute. If this attribute is omitted, then it is assumed to be 0.

end

Specifies the upper bound of possible values, i.e. values can't be greater than the value of this attribute. If this attribute is omitted, then it is assumed to be the value of start + 20.

step

Specifies the step of incrementing/decrementing values. This determines how much the value of the range will be changed upon user interaction. If this attribute is omitted, then it is assumed to be the value of end - start / 20.

Type restrictions

The range element can be bound to a node of type xsd:duration, xsd:date, xsd:time, xsd:dateTime, xsd:gYearMonth, xsd:gYear, xsd:gMonthDay, xsd:gDay, xsd:gMonth, xsd:float, xsd:decimal or xsd:double or any type derived from one of these.

Representations

The XForms range element is represented by a slider widget (xhtml only).

Characteristics

  • analogous widget is <xul:scale/>, which is available in Fx 3.0 only
  • if the incremental attribute has the value true, the value of the bound node will be updated upon each movement of the slider's thumb.