Formatting

The default values and responses are formatted based on the basic KCM type of the variable where the result is stored. Some of the basic types can be modified by KCM keywords, which affects the format where the results are specified.

TEXT

Text variables can contain any text.

<question>This is some text</question>

NUMBER

Numerical values must always use the US notation. They are allowed to contain a decimal point and must not contain thousands-separators.

<question>3.1415</question>

BOOL

The text TRUE is mapped to TRUE, and any other values are mapped to FALSE.

<question>TRUE</question>

NUMBER / DATE

Dates must be formatted in the XML Scheme xsd:date yyyy-mm-dd format.

<question>2005-12-31</question>

NUMBER / TIME

Times must be formatted in the XML Scheme xsd:time HH:MM:SS format. Note that this format uses a 24-hour clock.

<question>16:08:00</question>

TEXT / FILE

Since KCM ComposerUI automatically transfers files for questions that use the FILE keyword, it is necessary to store both the name of the remote file as well as the temporary copy of the local file. KCM ComposerUI requires two elements in the response XML file for such questions:

<question>File name as stored on the server</question>
<question-local>File name selected by the user </question-local>

MULTISELECT / TEXT

Responses to MULTISELECT questions are Base-64 encoded to allow the use of spaces, which would otherwise be interpreted as separators by the XForms specification.

Every response value must be Base-64 encoded and appropriately padded. Each encoded value must be prefixed with an "@" that serves as a separator while decoding the responses.

It is allowed to use whitespace and/or linebreaks to split long encodings over multiple lines but such splits are only allowed between encoded quadruplets.

<question>@MQ== @Mg== @Mw==</question>

which decodes to the response ('1'; '2'; '3').