Mitch,
Thanks for the very complete and detailed answer. I had been a little
boggled by the hodge-podge of files, but i can see it is a lot more simple
and self-contained than it appeared at first.
To take this thing to the next level, it would be interesting to see a
breakdown of the anatomy of a json survey.
From what I can see from a forensic analysis of the example survey provided
with the ODK Survey alpha
The file is divide into 5 major sections:
model
{21}
settings
[3]
survey
[39]
calculates
[1]
choices
{3}
The *Model *is where you place what we previously called the Instance and
its Nodes. That is, a placeholder for each datapoint. This also indicates
the type of data (integer, string, geopoint, etc. )
"coffee_today": {
"type": "integer"
The *Settings *contains the Form ID, Form Version, and Form Title:
{
"setting": "form_title",
"_rowNum": 4,
"value": "Example Form"
}
The *Survey *contains an entry for each question, in the order that they
are presented to the user. Each one refers to a node name from the Model.
It also contains a type indicator which will determine what kind of widget
will pop up. For example, in the model, the barcode node is type=string,
because the data will be stored as a string. But, here in the Survey
section, the type is 'barcode' so that it will launch the correct intent,
(barcode reader, camera, etc.) to generate the string that gets stored in
the barcode node.
{
"name": "barcode",
"_rowNum": 8,
"type": "barcode",
"param": null,
"label": "Scan a barcode"
},
The *Label *is also declared here, and I assume if you had more than one
language, it would be in here like
"label.Spanish": "Escanear un código de barras"
There are also the *params *and *conditions *for skip logic and
constraints.
"param": "intents_end",
"condition": "not(selected(data('examples'), 'intents'))"
Params may refer to a selection of options, like Yes, and No, whose
details are kept in the later section for choices.
"param": "yesno",
"label": "Have you visited Seattle?",
"type": "select_one",
There may be *calculates *for a question in the survey section
"condition": "calculates.ask_about_seattle()"
Which refer to the next section;
Calculates where special calculation type skip logic is stored.
{
"calculation": "selected(data('visited_continents'),
'NorthAmerica')",
"_rowNum": 2,
"name": "ask_about_seattle"
}
Finally, the *Choices *section contains options and values which are
referred to in the questions in the Survey section.
"yesno": [
{
"_rowNum": 2,
"name": "yes",
"label": "yes"
},
{
"_rowNum": 3,
"name": "no",
"label": "no"
}
Thats' the overview I can glean from a reading of it. I am sure that there
is somewhere an exhaustive description of the use of each of these. Some
more details for those who will likely write some of this without XLSForm,
would be greatly appreciated.
thanks,
☞§※☼:airplane:

~Neil