Problem uploading sample forms to aggregate 1.0 alpha6

Dear sirs

I have some problems uploading sample form definitions into aggregate 1.0 alpha6 that I configured for postgresql.
So far, I’ve tried Geo Tagger,Basic,Widgets, and Training. All except Training shows HTTP 400 error.
Are the old sample forms incompatible with this version of aggregate?

Yes, Aggregate 1.0 is much stricter, and the example forms do require some
changes before they will upload.

NOTE: If you are able, please build the latest tip of Aggregate 1.0 and use
it, as there was a bug in the decimal field treatment under MySQL in the
Alpha 6++ build.

Form upload changes are in three areas:

(1) Aggregate 1.0 requires that if you use an xmlns attribute to define the
form id, that it be in the form of a URI.

Often, the example forms have:

...



...

In this case, uploading the form will fail. You can either change the
"formid" to something like "http://your.org/formId" (or anything else that
looks like http://domain.name/...), or you can omit the xmlns and use an
"id" attribute. If you have both an xmlns and an id attribute, the id
attribute will be used:

...

This change makes it easier to use xml parsing tools that understand and
respect xmlns namespaces. It moves the forms closer to well-formed XML and
the XForms spec. It also supports eventually validating the form
declaration syntax with an xsd linked to the xmlns, should anyone want to go
down that path.

(2) Aggregate 1.0 is much pickier about having entries defining the
data types of each field in your form. These are easy to overlook in
calculated fields, and in fields you have in your form but are not using.
eIMCI requires at least two dozen changes to bring it into compliance for
Aggregate 1.0. Most of those are because the calculated fields don't
declare types.

The stricter handling is needed so that Aggregate 1.0 can create
database tables with appropriate column types. Rather than let you omit the
types and have Aggregate assume it is a string, it forces you to declare the
type. The one caveat to be aware of is that multiple-select fields are
always treated as space-separated string values.

(3) Aggregate 1.0 now supports tags. If you have a large
survey and only need to submit a summary portion of the form to Aggregate,
or if you are using the form body to hold an itemset for a selection widget,
you can now have:

And this will submit the /data/subset portion of your form to the server,
rather than the whole form. For this to work, the /data/subset must have an
id or xmlns attribute that matches the form id at the top of the data
element:

... ...

If the id's don't match, you won't be able to upload the form.

NOTE: Collect 1.1.6 and greater are the only versions of Collect that
recognize the submission tag. Older versions will submit the entire form
and if you use this feature, you cannot use those older versions of Collect.

··· ------- Mitch

On Thu, Apr 21, 2011 at 6:40 AM, Kee Chuang Sing general124@hotmail.comwrote:

Dear sirs

I have some problems uploading sample form definitions into aggregate 1.0
alpha6 that I configured for postgresql.
So far, I’ve tried Geo Tagger,Basic,Widgets, and Training. All except
Training shows HTTP 400 error.
Are the old sample forms incompatible with this version of aggregate?

--
Mitch Sundt
Software Engineer


University of Washington
mitchellsundt@gmail.com

FYI: I've update the design guidelines wiki with a section describing this:
http://code.google.com/p/opendatakit/wiki/XFormDesignGuidelines#Stricter_Form_Syntax_-_Aggregate_1.0

··· On Thu, Apr 21, 2011 at 11:36 AM, Mitch Sundt wrote:

Yes, Aggregate 1.0 is much stricter, and the example forms do require some
changes before they will upload.

NOTE: If you are able, please build the latest tip of Aggregate 1.0 and use
it, as there was a bug in the decimal field treatment under MySQL in the
Alpha 6++ build.

Form upload changes are in three areas:

(1) Aggregate 1.0 requires that if you use an xmlns attribute to define the
form id, that it be in the form of a URI.

Often, the example forms have:

...



...

In this case, uploading the form will fail. You can either change the
"formid" to something like "http://your.org/formId" (or anything else that
looks like http://domain.name/...), or you can omit the xmlns and use an
"id" attribute. If you have both an xmlns and an id attribute, the id
attribute will be used:

...

This change makes it easier to use xml parsing tools that understand and
respect xmlns namespaces. It moves the forms closer to well-formed XML and
the XForms spec. It also supports eventually validating the form
declaration syntax with an xsd linked to the xmlns, should anyone want to go
down that path.

(2) Aggregate 1.0 is much pickier about having entries defining the
data types of each field in your form. These are easy to overlook in
calculated fields, and in fields you have in your form but are not using.
eIMCI requires at least two dozen changes to bring it into compliance for
Aggregate 1.0. Most of those are because the calculated fields don't
declare types.

The stricter handling is needed so that Aggregate 1.0 can create
database tables with appropriate column types. Rather than let you omit the
types and have Aggregate assume it is a string, it forces you to declare the
type. The one caveat to be aware of is that multiple-select fields are
always treated as space-separated string values.

(3) Aggregate 1.0 now supports tags. If you have a large
survey and only need to submit a summary portion of the form to Aggregate,
or if you are using the form body to hold an itemset for a selection widget,
you can now have:

And this will submit the /data/subset portion of your form to the server,
rather than the whole form. For this to work, the /data/subset must have an
id or xmlns attribute that matches the form id at the top of the data
element:

... ...

If the id's don't match, you won't be able to upload the form.

NOTE: Collect 1.1.6 and greater are the only versions of Collect that
recognize the submission tag. Older versions will submit the entire form
and if you use this feature, you cannot use those older versions of Collect.


Mitch

On Thu, Apr 21, 2011 at 6:40 AM, Kee Chuang Sing general124@hotmail.comwrote:

Dear sirs

I have some problems uploading sample form definitions into aggregate 1.0
alpha6 that I configured for postgresql.
So far, I’ve tried Geo Tagger,Basic,Widgets, and Training. All except
Training shows HTTP 400 error.
Are the old sample forms incompatible with this version of aggregate?

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer


University of Washington
mitchellsundt@gmail.com