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:
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. )
The *Settings *contains the Form ID, Form Version, and Form Title:
"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.
"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
"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.
"label": "Have you visited Seattle?",
There may be *calculates *for a question in the survey section
Which refer to the next section;
Calculates where special calculation type skip logic is stored.
Finally, the *Choices *section contains options and values which are
referred to in the questions in the Survey section.
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.