Developer Documentation Library > Mobile SDK > Disconnected mobile application reference > SurveyQuestionXMLMDSC reference > Question transformation (Questions XML)
 
Question transformation (Questions XML)
The generated Questions XML is essentially the same as Player XML. However, some information, which is normally added by the IOM, is absent. Other information, that is normally only used internally by the IOM, is added to the Questions XML, which makes the information available on the client. The Questions XML purpose is to return a set of questions to the mobile application. The mobile application is then responsible for building the interview pages by adding default values for items that are normally specified in the Player XML (such as navigation).
Before each XML artifact is discussed, take note of the following items:
The label text automatically takes into account alternative rules that are specified in the MDD file.
The label text includes unexpanded inserts that are normally expanded in the Player XML. For example, when the Player XML includes Thank you Sarah for completing this interview, the Client XML includes Thank you {#Name} for completing this interview.
SourceType=sExpression or sExpressions variables are excluded from the Question XML.
Shared category lists are expanded into the questions that use the lists.
Database questions are converted into regular questions with generated Category elements. The questions are based on the database information at the time the Questions XML is generated.
SingleResponse database questions are transformed into the appropriate text, long, date, or double question types.
MultipleResponse database questions are transformed into a NumericLoop with a single subquestion named DBID.
DatabaseArray questions are transformed into a CategoricalLoop.
The Questions XML also includes the system variables, as Question nodes. The mobile application must supply answers for the questions. To help the identification of system variables, and to indicate that they must not be provided to the respondent, the questions are marked with a IsSystem="True" attribute. The attribute is present at all levels in the Question hierarchy. For example, the attribute is present for the DataCollection block question along with the simple DataCollection.FinishTime date question.
System variables are not included in the Routing XML. The mobile application is responsible for completing the system variable data.
The Question elements are structured hierarchically, similar to the MDM (as Fields). The elements are not flattened into separate questions (not VariableInstances). The mobile application is responsible for rendering the question information (for example, as a grid or as a sequence of simple questions). The mobile application must also transfer the hierarchical responses into the flattened data that is expected by the Value Cache object.
Questions in hierarchical and flattened formats
Hierarchical format
Flattened format
Q1 "q1" text;
Q1
Loop1 "loop1" loop[1..3]
fields(
q1 "q1" text;
q2 "q2" text;
)expand;
Loop1[1].q1
Loop1[1].q2
Loop1[2].q1
Loop1[2].q2
Loop1[3].q1
Loop1[3].q2
Loop1 "loop1" loop{a,b,c}
fields(
q1 "q1" text;
q2 "q2" text;
)expand;
Loop1[{a}].q1
Loop1[{a}].q2
Loop1[{b}].q1
Loop1[{b}].q2
Loop1[{c}].q1
Loop1[{c}].q2
Block1 "block1" block
Fields(
Q1 "q1" text;
Q2 "q2" text;
);
Block1.Q1
Block1.Q2
Compound1 "compound" compound{a,b,c}
Fields
(
Q1 "q1" text;
Q2 "q2" text;
);
Compound1.Q1
Compound1.Q2
The following MDD information is not present in the Question XML or the Routing XML as of no use for the client.
version history
category map (each Category element uses its category value as an attribute)
save logs
atoms
data sources.
See also
SurveyQuestionXMLMDSC reference