XLSForm.org online seems to have a subtle bug

Folks, forgive me all the screenshots, but I spent all day frustrated becoz of this bug.

It's a little bug, I'm sure, but it's a subtle bug.

On the XLSForm.org page (http://xlsform.org/#relevant), in the section on Relevant, there is some sample code, which I took the time to load into a spreadsheet, and convert to an XML using this tool (http://opendatakit.org/xiframe/).

Now, the spreadsheet, test.xls, when loaded and submitted, crashes in a shower of sparks. Being an avid amateur firefighter, I found that removing the single quotes around 2 variables and saving the spreadsheet without the single quotes, produced a completely different result. No crash.

However, when I loaded the resultant test.xml onto my POS tablet, I was surprised to find that the behaviour described in the Relevant section did NOT occur.

I even passed the test.xml through the java validator tool and it produced no errors.

But, having read on this forum that the single quotes were NECESSARY, I edited test.xml directly and replaced the single quotes around the two variables in the attributes 'relevant=', etc.

The resulting test-WITH-SINGLE-QUOTES.xml, when loaded onto the POS tablet, did, in fact, produce the expected behaviour described in the Relevant section on the XLSForm.org page.

To my simple mind, this suggests that the tool (http://opendatakit.org/xiframe/) has a bug, which is excited by the particular circumstance described in the Relevant section.

As I KNOW that you guys are way better than me at this kind of stuff, I thought I'd bring it to your attention, in the hope that this could be corrected, as it might give others the idea that the online tool (and by association, ODK) does not work. That would be a great pity.

I personally think ODK is one of the best pieces of software I have had the great fortune to run across in my career. I can't stop talking about it.

Have a pleasant week, folks.

Seth

test.xls (8.5 KB)

image

Hi Seth,

Ugh. Now that I've seen the screenshots, I know what the problem is.
The Excel file has smart/curly quotes instead of dumb/straight quotes.
Once I made that change, it worked great.

This is a subtle issue. The smart quotes are shown on the xlsform.org
website because that's sites/documents trend towards smart vs dumb
quotes these days. So if you copy and paste that example, you'll end
up with an invalid form.

I've filed the issue at https://github.com/XLSForm/pyxform/issues/110.
I think the right fix is to convert smart quotes to dumb quotes in
pyxform. Pull requests are welcome!

Thanks,

Yaw

image

image

··· On Sun, May 7, 2017 at 8:15 PM, wrote: > Folks, forgive me all the screenshots, but I spent all day frustrated becoz of this bug. > > It's a little bug, I'm sure, but it's a subtle bug. > > On the XLSForm.org page (http://xlsform.org/#relevant), in the section on Relevant, there is some sample code, which I took the time to load into a spreadsheet, and convert to an XML using this tool (http://opendatakit.org/xiframe/). > > Now, the spreadsheet, test.xls, when loaded and submitted, crashes in a shower of sparks. Being an avid amateur firefighter, I found that removing the single quotes around 2 variables and saving the spreadsheet without the single quotes, produced a completely different result. No crash. > > However, when I loaded the resultant test.xml onto my POS tablet, I was surprised to find that the behaviour described in the Relevant section did NOT occur. > > I even passed the test.xml through the java validator tool and it produced no errors. > > But, having read on this forum that the single quotes were NECESSARY, I edited test.xml directly and replaced the single quotes around the two variables in the attributes 'relevant=', etc. > > The resulting test-WITH-SINGLE-QUOTES.xml, when loaded onto the POS tablet, did, in fact, produce the expected behaviour described in the Relevant section on the XLSForm.org page. > > To my simple mind, this suggests that the tool (http://opendatakit.org/xiframe/) has a bug, which is excited by the particular circumstance described in the Relevant section. > > As I KNOW that you guys are way better than me at this kind of stuff, I thought I'd bring it to your attention, in the hope that this could be corrected, as it might give others the idea that the online tool (and by association, ODK) does not work. That would be a great pity. > > I personally think ODK is one of the best pieces of software I have had the great fortune to run across in my career. I can't stop talking about it. > > Have a pleasant week, folks. > > Seth > > -- > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > --- > You received this message because you are subscribed to the Google Groups "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.