Control Description Reference

This chapter provides a discussion of an overview of the namespace for the control description, and its elements and attributes.

1. Overview

Provides an overview of the namespace for the control description.

1.1. Features and Usage

A namespace used to describe user interface control used in XML documents in xfy technology user agent.

1.2. Namespace URI Reference

The namespace's URI reference of the control description is http://xmlns.xfytec.com/controls. In the following discussion, use the namespace prefix "ctrl:" in order to describe the elements of the control description.

Also, we use the following namespaces and their prefixes in the descriptions below.

2. Elements, Attributes and Events Defined within the Control Description's Namespace

This section provides a discussion about elements, attributes, and events defined in the namespace for the control description.

2.1. Control Description

Explains elements used to describe user interface control and behavior settings of user interface control.

2.1.1. Control Description Element

Elements and attributes used to describe user interface control in control description's namespace are as follows:.

ctrl:input Element

Creates a control to input value. The following controls can be created by specifying a value for type attribute.

  • Text field
  • Check box
  • Date input control

The date format to be input in a date input control is CCYY-MM-DD. (CC: first two digits of a year, YY: last two digits of a year, MM: month, DD: day)

Attribute:
type

Describes control type to create in order to create controls other than text field. This can be specified with one of the following strings.

boolean
Creates a check box.
date
Creates date input control.

Creates a text field, if omitted.

style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

ref

Describes a node of source XML document in XPath expression which reflects a value set in control.

If omitted, the node which reflects a value set in control is not assumed to exist.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

maxlength

Sets maximum length of input string. This can be an integer value greater than 1. If a control other than text field is created according to type attribute, it becomes invalid.

If omitted, string length to input is not restricted.

text-filler

Sets string to display instead, if display string data does not exist. If a control other than text field is created according to type attribute, it becomes invalid.

If omitted, null string is assumed to be specified.

inputmode

Sets the IME input mode. This can be described in one of the following strings.

hiragana
Sets to hiragana input mode.
katakana
Sets to double-byte katakana input mode.
katakana halfWidth
Sets to single-byte katakana input mode.
latin fullWidth
Sets to double-byte alphanumeric input mode.
off
Turns IME input mode off.

If a control other than text field is created according to type attribute, it becomes invalid. For IME input mode setting, see IME Control.

If omitted, IME control will not be performed.

dispatch-value-changed-event

Specifies when ctrl:value-changed event is issued. This can be described in one of the following strings.

text-committed
An event is issued when a control loses focus and when the Enter key is pressed over a control.
text-edited
Issued when string is edited over a control.

If a control other than text field is created according to type attribute, it becomes invalid.

If omitted, text-committed is assumed to be set.

Content:

The ctrl:input element can contain the following elements.

  • ctrl:label Element
    If you set type attribute to boolean, be sure to specify one element.
    Otherwise, only one element can be specified. Optional.
  • xvcd:action Element
    Any elements can be specified. Optional.

ctrl:secret Element

Creates a string input control to display * instead of input text. Use to keep input string such as password from being read.

Attribute:
style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

ref

Describes a node of source XML document in XPath expression which reflects a value set in control.

If omitted, the node which reflects a value set in control is not assumed to exist.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

maxlength

Sets maximum length of input string. This can be an integer value greater than 1.

If omitted, string length to input is not restricted.

Content:

The ctrl:secret element can contain the following elements.

ctrl:textarea Element

Creates multi-line string control to insert a line break.

Attribute:
style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

ref

Describes a node of source XML document in XPath expression which reflects a value set in control.

If omitted, the node which reflects a value set in control is not assumed to exist.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

maxlength

Sets maximum length of input string. This can be an integer value greater than 1.

If omitted, string length to input is not restricted.

inputmode

Sets the IME input mode. This can be described in one of the following strings.

hiragana
Sets to hiragana input mode.
katakana
Sets to double-byte katakana input mode.
katakana halfWidth
Sets to single-byte katakana input mode.
latin fullWidth
Sets to double-byte alphanumeric input mode.
off
Turns IME input mode off.

If a control other than text field is created according to type attribute, it becomes invalid. For IME input mode setting, see IME Control.

If omitted, IME control will not be performed.

dispatch-value-changed-event

Specifies when ctrl:value-changed event is issued. This can be described in one of the following strings.

text-committed
An event is issued when a control loses focus and when the Enter key is pressed over a control.
text-edited
Issued when string is edited over a control.

If omitted, text-committed is assumed to be set.

Content:

The ctrl:textarea element can contain the following elements.

ctrl:range Element

Creates a spinner control to input specified range of numeric values.

Attribute:
start (mandatory)

Sets maximum value of input. This can be an integer value greater than -9,223,372,036,854,775,808 and less than 9,223,372,036,854,775,807. If fractional value is specified in step attribute, the maximum value set to control is 10 raised to the power of - specified value (number of decimals of step attribute value). If the number of decimals exceeds the number of decimals of step attribute, exceeded data will be truncated. You cannot specify the value to be set as exponent representation.

end (mandatory)

Sets minimum value of input. This can be an integer value greater than -9,223,372,036,854,775,808 and less than 9,223,372,036,854,775,807. If fractional value is specified in step attribute, the minimum value set to control is 10 raised to the power of - specified value (number of decimals of step attribute value). If the number of decimals exceeds the number of decimals of step attribute, exceeded data will be truncated. You cannot specify the value to be set as exponent representation.

step

Sets the range of numeric values to increase or decrease. If a fractional value is specified, you can input the number of decimals. 18 digits can be specified as a number of digits under decimal-point.

If omitted, 1 is assumed to be specified.

style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

ref

Describes a node of source XML document in XPath expression which reflects a value set in control.

If omitted, the node which reflects a value set in control is not assumed to exist.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

Content:

The ctrl:range element can contain the following elements.

ctrl:select1 Element

Creates a control to select one from multiple choices. The following controls can be created by specifying a value for appearance attribute.

  • Radio button
  • List box
  • Drop-down list, or combo box
Attribute:
appearance

Sets appearance of control to create. This can be described in one of the following strings.

full
Radio button
compact
List box
minimal
Drop-down list, or combo box

If omitted, minimal is assumed to be set.

selection

When minimal is set as an appearance attribute value, specifies whether any string can be input or not. This can be described in one of the following strings.

open
This can be any string. the control is combo box.
closed
This cannot be any string. The control is a drop-down list.

Ignored, if appearance attribute value is not minimal.

If omitted, closed is assumed to be specified.

direction

When full is set as an appearance attribute value, sets whether radio buttons are arranged horizontally or vertically. This can be described in one of the following strings.

vertical
Radio buttons are arranged vertically.
horizontal
Radio buttons are arranged horizontally.

Ignored, if appearance attribute value is not full.

If omitted, horizontal is assumed to be specified.

style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

ref

Describes a node of source XML document in XPath expression which reflects a value set in control.

If omitted, the node which reflects a value set in control is not assumed to exist.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

alert-invalid-value

If the value indicated by the node set to ref attribute cannot be set for a control, sets whether to show the warning or not. It can be a true/false value.

true
If the value indicated by the node set to ref attribute cannot be set for a control, shows the warning.
false
Shows no warning even if the value indicated by the node set to ref attribute cannot be set.

If ref attribute is not specified or if the control is invalid, no warning is shown despite of the value to be set. Enabled when full is set to appearance attribute.

If omitted, true is assumed to be set.

maxlength

Sets maximum length of input string. This can be an integer value greater than 1.

If omitted, string length to input is not restricted.

inputmode

Sets the IME input mode. This can be described in one of the following strings.

hiragana
Sets to hiragana input mode.
katakana
Sets to double-byte katakana input mode.
katakana halfWidth
Sets to single-byte katakana input mode.
latin fullWidth
Sets to double-byte alphanumeric input mode.
off
Turns IME input mode off.

If a control other than text field is created according to type attribute, it becomes invalid. For IME input mode setting, see IME Control.

If omitted, IME control will not be performed.

popup-height

Sets the height when showing a scroll bar in the popup of drop-down list or combo box. Specify using CSS length unit systems: px, em and ex.

If omitted, 200px is assumed to be specified.

Content:

The ctrl:select1 element can contain the following elements.

ctrl:select Element

Creates a list box control to select multiple values from multiple choices

Attribute:
appearance

Sets appearance of control to create. This can be described in one of the following strings.

compact
List box

If omitted, compact is assumed to be specified.

style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

ref

Describes a node of source XML document in XPath expression which reflects a value set in control.

If omitted, the node which reflects a value set in control is not assumed to exist.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

Content:

The ctrl:select element can contain the following elements.

ctrl:trigger Element

Creates a button control to issue a ctrl:triggered event on clicking.

Attribute:
style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

command

Sets string which indicates the command issued in ctrl:triggered event. It can be QName. If an operation is specified using xvcd:action element in ctrl:trigger element, the command specified in command attribute will not be performed.

If omitted, execution command is not assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

Content:

The ctrl:trigger element can contain the following elements.

ctrl:select-color Element

Creates a color selection control.

Attribute:
pallete

Sets the color palette type used in color selection control. This can be described in one of the following strings.

css-defined
Uses 16-color palette with defined keywords which indicate colors in CSS.
web-safe
Uses 216-color palette as Web safe color.

If omitted, css-defined is assumed to be set.

style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

ref

Describes a node of source XML document in XPath expression which reflects a value set in control.

If omitted, the node which reflects a value set in control is not assumed to exist.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

readonly

Sets whether a control is reference only or not. It can be an XPath expression. A control is determined whether it is reference only or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is reference only.
If the expression evaluates to false,
A control works normally.

If omitted, false() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

Content:

The ctrl:select-color element can contain the following elements.

ctrl:border Element

Creates a border to group controls and use title. Specify a group title in ctrl:label element of the element content.

Attribute:
style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

Content:

The ctrl:border element can contain the following elements.

ctrl:static-label Element

Displays the label. Specify a display string in ctrl:label element of the element content.

Unlike ctrl:label element, available as a vertex element of control description vocabulary.

Attribute:
style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

relevant

Sets whether control is valid or not. It can be an XPath expression. A control is determined whether it is valid or not by evaluating its described XPath expression as true or false value.

If the expression evaluates to true,
the control is valid.
If the expression evaluates to false,
the control is invalid.

If omitted, true() is assumed to be set.

design-mode

Sets whether it uses design-mode or not. It can be a true/false value.

true
Available in design mode.
false
Unavailable in design mode.

If omitted, false is assumed to be set.

Content:

The ctrl:static-label element can contain the following elements.

ctrl:label Element

Specifies a label string in the element. Unlike ctrl:static-label element, specify it in the element content in order to set a label string to a control created in other elements.

Unavailable as vertex element of control description vocabulary.

Attribute:
style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

Content:

Specify control's label string by PCDATA string in ctrl:label element.

ctrl:item Element

Specifies single item selected in ctrl:select1 element or ctrl:select element. Specify an item value in ctrl:value element of the element content. Specify an item name in ctrl:label element of the element content. If ctrl:label element is omitted, ctrl:value element content is used as an item name.

Unavailable as vertex element of control description vocabulary.

Attribute:
style

Describes the style sheet applied to the control. Describe a style sheet with CSS.

If omitted, no style sheet to apply is assumed.

Content:

The element can contain the following elements.

ctrl:value Element

Specifies single item selected in ctrl:select1 element or ctrl:select element.

Unavailable as vertex element of control description vocabulary.

Attribute:

No attributes for the element.

Content:

Specify the string held in ctrl:item element by PCDATA string in ctrl:value element.

2.1.2. Design Mode

When creating a user interface with control in XVCD, you can create it in design mode.

In design mode, you can study control layout in the screen. In design mode, every control can be focused regardless of an attribute value. Other key or mouse operations are however invalid.

Specify whether to use control in design mode or not for each control described in XVCD.

2.1.3. IME Control

If a control is used to input string, you can set IME input mode in XVCD when the control is focused. If you changed IME input mode in XVCD, IME does not go back to previous input mode after the control loses focus.

Even if control's IME input mode is set in XVCD, you can change IME input mode. Therefore, if input text size is restricted in the control, input string should be checked despite of IME input mode setting.

2.2. Events

Explains about event handling in each element of control description namespace and defined event element.

2.2.1. Events Handling

An event corresponding to user operation is issued on the controls created in the following elements:

If xvcd:action element is specified in each element content, you can specify a response to the event issued from control.

In the control element, in which ctrl:value-changed event is issued, the following build-in commands are provided as default event handling:

<xvcd:command>
  <instruction:param name="ctrl:ref" />
  <instruction:param name="event:event" />
  <xvcd:set-text select="$crtl:ref" value="{$event:event/ctrl:*/@value}" />
</xvcd:command>

To use default ctrl:value-changed event handling, in ref attribute of each element, you should specify the node which reflects a value set in the control.

2.2.2. Event Element

The event elements defined in the control description namespace are listed below. You don't write an event element to describe your XVCD. Describes the event elements with platform.

ctrl:value-changed Event

Issued when control value is changed. Elements in which the event is issued are as follows:

Attribute:
value (mandatory)

The value set in the control is set to when an event is issued. The value's content to be set may vary according to control.

ctrl:input Element
the operation may vary according to the value of type attribute.
If a value is not set to type attribute:
The input string is specified.
If boolean is set to type attribute:
This can be true or false.
If date is set to type attribute:
The string representing the dates is set in CCYY-MM-DD format.
ctrl:secret, ctrl:textarea elements
The input string is specified.
ctrl:range Element
The input numeric value is specified. If a numeric value out of available range is input in the control, numeric value converted within the range is set.
ctrl:select1 Element
The ctrl:value element content, which is described in the content of ctrl:item element corresponding to the selected item, is set.
ctrl:select Element
The ctrl:value element content, which is described in the content of ctrl:item element corresponding to the selected item, and is separated and connected by single-bye space, is set.
ctrl:select-color Element
The string, which represents RGB values of selected color in #RRGGBB format, is specified.
Content:

The ctrl:value-changed element is empty.

ctrl:caret-moved Event

Issued when the caret moves in the control. Elements in which the event is issued are as follows:

Attribute:
offset (mandatory)

Offset position is set from the top of the string input in a control. The offset position is represented by an integer from top of the string as zero.

Content:

The ctrl:caret-moved element is empty.

ctrl:triggered Event

Issued when the control created in ctrl:trigger element is clicked.

Attribute:

No attributes for the element.

Content:

The ctrl:triggered element is empty.