ODK (collect or build?) bug: space and newlines added at beginning and end of default values

I post it here because I haven't found any bug tracker.

Steps to reproduce:

  1. Create a new form with ODK Build
  2. Create a text field, give it a name, a caption AND a default value
    such as "Test default value"
  3. Export to xml; install this form into ODK Collect
  4. In ODK Collect, start filling the form

Observed issue: when it comes to the text field, the default value has
extra blank lines and spaces at the beginning and end.

Expected: the value should be the one you inserted in ODK Build,
without any extra spaces.

I guess the cause of this is that the generated form XML has
indentation, and the default values are indented as well, but ODK
Collect takes the whole content of the xml text node, including the
blank spaces at the beginning and end, as the value.

I don't know whether some of the involved standards say that trailing
and ending spaces should be ignored; if they do, then this is a bug in
ODK Collect that doesn't trim the string; if they don't, then this is
a bug in ODK Build that shouldn't add extra spaces and linebreaks
within text nodes.

Hi Matteo,

May be you are looking for this:

http://code.google.com/p/opendatakit/issues/list

··· On Thu, Sep 22, 2011 at 11:28 PM, Matteo Sisti Sette < matteosistisette@gmail.com> wrote:

I post it here because I haven't found any bug tracker.

Steps to reproduce:

  1. Create a new form with ODK Build
  2. Create a text field, give it a name, a caption AND a default value
    such as "Test default value"
  3. Export to xml; install this form into ODK Collect
  4. In ODK Collect, start filling the form

Observed issue: when it comes to the text field, the default value has
extra blank lines and spaces at the beginning and end.

Expected: the value should be the one you inserted in ODK Build,
without any extra spaces.

I guess the cause of this is that the generated form XML has
indentation, and the default values are indented as well, but ODK
Collect takes the whole content of the xml text node, including the
blank spaces at the beginning and end, as the value.

I don't know whether some of the involved standards say that trailing
and ending spaces should be ignored; if they do, then this is a bug in
ODK Collect that doesn't trim the string; if they don't, then this is
a bug in ODK Build that shouldn't add extra spaces and linebreaks
within text nodes.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

Well, according to the w3 spec, leading and trailing whitespace is supposed to deleted from text nodes:
http://www.w3.org/TR/xmlschema-1/#d0e1654

··· On Thursday, September 22, 2011 at 1:34 PM, Daniel Kayiwa wrote:

Hi Matteo,

May be you are looking for this:

http://code.google.com/p/opendatakit/issues/list

On Thu, Sep 22, 2011 at 11:28 PM, Matteo Sisti Sette <matteosistisette@gmail.com (mailto:matteosistisette@gmail.com)> wrote:

I post it here because I haven't found any bug tracker.

Steps to reproduce:

  1. Create a new form with ODK Build
  2. Create a text field, give it a name, a caption AND a default value
    such as "Test default value"
  3. Export to xml; install this form into ODK Collect
  4. In ODK Collect, start filling the form

Observed issue: when it comes to the text field, the default value has
extra blank lines and spaces at the beginning and end.

Expected: the value should be the one you inserted in ODK Build,
without any extra spaces.

I guess the cause of this is that the generated form XML has
indentation, and the default values are indented as well, but ODK
Collect takes the whole content of the xml text node, including the
blank spaces at the beginning and end, as the value.

I don't know whether some of the involved standards say that trailing
and ending spaces should be ignored; if they do, then this is a bug in
ODK Collect that doesn't trim the string; if they don't, then this is
a bug in ODK Build that shouldn't add extra spaces and linebreaks
within text nodes.

--
Post: opendatakit@googlegroups.com (mailto:opendatakit@googlegroups.com)
Unsubscribe: opendatakit+unsubscribe@googlegroups.com (mailto:opendatakit%2Bunsubscribe@googlegroups.com)
Options: http://groups.google.com/group/opendatakit?hl=en

--
If we keep uppermost in our minds the unkind and unjust acts of others, we shall find it impossible to love them as Christ has loved us; but if our thoughts dwell upon the wondrous love and pity of Christ for us, the same spirit will flow out to others.

Post: opendatakit@googlegroups.com (mailto:opendatakit@googlegroups.com)
Unsubscribe: opendatakit+unsubscribe@googlegroups.com (mailto:opendatakit+unsubscribe@googlegroups.com)
Options: http://groups.google.com/group/opendatakit?hl=en

Definitely, thanks!
There should be a link to that at http://opendatakit.org/participate/
where it even mentions bugs but doesn't mention the bug tracker.

··· On Sep 22, 10:34 pm, Daniel Kayiwa wrote: > Hi Matteo, > > May be you are looking for this: > > http://code.google.com/p/opendatakit/issues/list

Well, according to the w3 spec, leading and trailing whitespace is supposed to deleted from text nodes:http://www.w3.org/TR/xmlschema-1/#d0e1654

Good! So the bug is definitely in ODK Collect

··· On Sep 23, 10:07 am, Clint Tseng wrote:

i've added the link to the participate and filed the bug at
http://code.google.com/p/opendatakit/issues/detail?id=334

··· On Fri, Sep 23, 2011 at 18:02, Matteo Sisti Sette wrote: > On Sep 22, 10:34 pm, Daniel Kayiwa wrote: >> Hi Matteo, >> >> May be you are looking for this: >> >> http://code.google.com/p/opendatakit/issues/list > > Definitely, thanks! > There should be a link to that at http://opendatakit.org/participate/ > where it even mentions bugs but doesn't mention the bug tracker. > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >