Otise / opendatakit

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

reference to a node element causes a form to crash #646

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
reference: 
https://groups.google.com/d/topic/javarosa-developers/AxAdvTfuRwY/discussion

What steps will reproduce the problem?
1. using attached xform, fill-in the fields (name, kinship, age) in a loop
2. At the end of the loop, select "add another" to add another person.
3. You will be asked to fill-in the name. Enter one and/or swipe to next page 
and Collect crashes.

What is the expected output? What do you see instead?
Access the value stored in the node /d_bug/roster[1]/name. 

The xform works if there's only one node, if there's more than one node Collect 
crashes after you fill-in your name.

What version of the product are you using? On what operating system?
1.2 1012 on 2.3.7

Please provide any additional information below.
See attached xform and catlog

Original issue reported on code.google.com by Nikolai...@gmail.com on 21 Jul 2012 at 1:36

Attachments:

GoogleCodeExporter commented 9 years ago
The expression that causes the failure is: "/d_bug/roster[1]/name".

If I take this out, the loop works fine.

Original comment by Nikolai...@gmail.com on 21 Jul 2012 at 1:38

GoogleCodeExporter commented 9 years ago
It appears that most of the XPath functions are not supported in this version 
of JR.

I.e., last(), first(), position(), etc. are not available.

While these parse and validate, they do not actually filter anything, causing 
the full list to be passed through (why not an error?), which in turn causes 
the reported fault.

Original comment by mitchellsundt@gmail.com on 24 Jul 2012 at 7:51

GoogleCodeExporter commented 9 years ago
Fixed in 1.2 rev 1013 if you change the form to use position()=1

Attached is the revised form.

Original comment by mitchellsundt@gmail.com on 27 Jul 2012 at 11:35

Attachments: