Spaces in values of multi select

Hi,

I've noticed that the values of a multi select are placed in a single
xml node separated by spaces. Is this something dictated by the OpenRosa
standard or is this a design choice of ODK?

What am I missing that makes this more reasonable than putting each
selected value into a child node?

What should I do if I have values that contain spaces, so that I can
distinguish whether the answering user has selected the options "a", "b"
and "c" or a single option whose value is "a b c"?

Thanks
m.

It is from the XForms spec: http://www.w3.org/TR/xforms/#ui-selectMany

Excerpt from that noting that values cannot contain whitespace (in
specification-speak):

Note:

A limitation of the XML Schema list datatypes is that white space
characters in the storage values (the value element) are always interpreted
as separators between individual data values. Therefore, authors should
avoid using white space characters within storage values with list
simpleContent.

Mitch

··· On Fri, Nov 4, 2011 at 2:55 PM, Matteo Sisti Sette < matteosistisette@gmail.com> wrote:

Hi,

I've noticed that the values of a multi select are placed in a single xml
node separated by spaces. Is this something dictated by the OpenRosa
standard or is this a design choice of ODK?

What am I missing that makes this more reasonable than putting each
selected value into a child node?

What should I do if I have values that contain spaces, so that I can
distinguish whether the answering user has selected the options "a", "b"
and "c" or a single option whose value is "a b c"?

Thanks
m.

--
Mitch Sundt
Software Engineer

University of Washington
mitchellsundt@gmail.com

Matteo,

We have the same issue in that we use a lot of MULTI select questions, and
it is hard to analyze them when they are in the format 1 2 3 4

It's better if they are separated into sub-nodes. My solution was to build
an app that divides MULTI nodes while synching to your computer. There is a
caveat that the java app requires you to indicate which nodes are
multi-select by naming them with a suffix, like this: <node_MULTI_> .

Anyway, you can use KoBoSync
http://www.kobotoolbox.org/products/kobosyncto do it, it's perfectly
compatible with ODK and you will end up with a
nice aggregated CSV of all your collected data. Your multi will end up as
seperate columns with a 1 or 0.

node_MULTI_1, node_MULTI_2, node_MULTI_3
1, 0, 1

http://www.kobotoolbox.org/products/kobosync

There's a standalone version, and it's also built into the online form
builder, which takes care of naming your nodes properly when you create
MULTI questions. Requires java.

I hope that helps,

☞§※☼:airplane::open_umbrella::slight_smile:
~Neil

··· On Fri, Nov 4, 2011 at 5:55 PM, Matteo Sisti Sette < matteosistisette@gmail.com> wrote:

Hi,

I've noticed that the values of a multi select are placed in a single xml
node separated by spaces. Is this something dictated by the OpenRosa
standard or is this a design choice of ODK?

What am I missing that makes this more reasonable than putting each
selected value into a child node?

What should I do if I have values that contain spaces, so that I can
distinguish whether the answering user has selected the options "a", "b"
and "c" or a single option whose value is "a b c"?

Thanks
m.