ODK Survey: Using Legacy XML with Aggregate server

The documentation is pretty good for using the Legacy XML so that you can
use ODK Survey with Aggregate server. I found something I think is an
issue, in that you can have more than one formdef.json per table, which
makes it impossible to create stubs for both of them.

The perfect example is in the provided examples, the Household has a linked
relationship with Household members. In household member, there are two
separate sections for "member" and "education".
Each section has it's own XLSX, but both of these write to the same table
in the database "household_member"

Using the LegacyXML
https://opendatakit.org/use/2_0_tools/odk-application-designer-2-0-rev126/odk-legacy-xml-2-0-rev126/
function
in AppDesigner, you can create only one XML file per tableID, and only one
media folder to go with it.

So, in the case of the example household application, how would you go
about uploading this to ODK Aggregate so users can download it?

I think the documentation in this area is likely misleading in places.

Early in fall 2014, we changed how the legacy download works.
It now downloads TABLE DEFINITIONS, not form definitions.

So the legacy XML converter generates a table definition file.

I swept through the documentation and updated wording that jumped out at
me, but I think the overall flow is still written w.r.t. the legacy XML
converter generating form definitions. The code is still biased in that
way, too, so there are some odd edge cases in the downloads and uploads UI
that need to be cleaned up, and labels that are incorrect.

You only need to generate the XML table definition for one of the forms
that work with the table. Each form needs to declare all the fields in the
form via the use of a model sheet.

The resulting structure w.r.t. the Form Uploader would be:

tableId.xml
-- the xml generated by the legacy form converter using one of the forms
(e.g., form1)

tableId-media/forms.zip
-- a zip of the forms directory within the
/sdcard/opendatakit/appName/tables/tableId directory.

And that zip would explode into forms/form1/..., forms/form2/...

··· ===== Going forward, it would probably make sense to auto-generate the legacy XML using the form whose formId matches the tableId, like we are currently doing with the definition.xml and properties.xml files.

On Sat, Apr 4, 2015 at 7:51 AM, Neil Hendrick mojotexas@gmail.com wrote:

The documentation is pretty good for using the Legacy XML so that you can
use ODK Survey with Aggregate server. I found something I think is an
issue, in that you can have more than one formdef.json per table, which
makes it impossible to create stubs for both of them.

The perfect example is in the provided examples, the Household has a
linked relationship with Household members. In household member, there are
two separate sections for "member" and "education".
Each section has it's own XLSX, but both of these write to the same table
in the database "household_member"

Using the LegacyXML
https://opendatakit.org/use/2_0_tools/odk-application-designer-2-0-rev126/odk-legacy-xml-2-0-rev126/ function
in AppDesigner, you can create only one XML file per tableID, and only one
media folder to go with it.

So, in the case of the example household application, how would you go
about uploading this to ODK Aggregate so users can download it?

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com