evilGmonkey / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

extra whitespaces added at beginning and end of default values #331

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build a form with odk build
2. create a text field
3. assign it a default value such as "My default value" (do _not_ check the 
"read only" option)
4. export the form to xml and import it into odk collect
5. in odk collect, start filling the form

What is the expected output? 

The text field should be shown with the default value pre-filled in it, but 
without additionan spaces at the beginning and end

What do you see instead?

Instead extra white spaces and linebreaks are added before and after the value. 
For example, if the default value was "My defalt value", it is displayed as:
---(here starts the text field)---

     My default value

---(here ends the text field)---

It seems that ODK Build ads extra space in order to indent the xml in a pretty 
way, which seems to be correct because if i understand correctly, extra white 
space at the beginning and end of text nodes is to be considered irrelevant. So 
the error is in ODK Collect which should strip these spaces and newlines away 
and does not.

Original issue reported on code.google.com by matteosi...@gmail.com on 23 Sep 2011 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by wbrune...@gmail.com on 23 Sep 2011 at 4:30

GoogleCodeExporter commented 9 years ago
This is a javarosa bug.  I've passed it along to them.

Original comment by carlhart...@gmail.com on 27 Sep 2011 at 9:18