org.javarosa.xpath.XPathUnsupportedException: XPath evaluation: unsupported construct [step other than 'child::name', '.', '..']

Hallo!

We (a group of students) are currently trying to evaluate ODK Collect
for using it withing a medical enviornment. For doing this, we were
given a sample XForm file (you can find it here http://dpaste.com/hold/541169/).
We tried loading it but ODK Collect died with an exception. So I
installed the Android SDK and used the logcat command to trace the
error:

I/System.out(10709): Parsing form...
I/System.out(10709): Warning: 2 Unrecognized attributes found in
Element [meta] and will be ignored: [http-equiv,content] Location:
I/System.out(10709): Problem found at nodeset: /html/head/meta
I/System.out(10709): With element
I/System.out(10709): Title: "Demographics"
I/System.out(10709): Warning: 1 Unrecognized attributes found in
Element [model] and will be ignored: [id] Location:
I/System.out(10709): Problem found at nodeset: /html/head/model
I/System.out(10709): With element
D/dalvikvm(10709): GC_FOR_MALLOC freed 4291 objects / 237904 bytes in
24ms
D/dalvikvm(10663): GC_EXPLICIT freed 1169 objects / 86176 bytes in
179ms
W/System.err(10709): org.javarosa.xpath.XPathUnsupportedException:
XPath evaluation: unsupported construct [step other than
'child::name', '.', '..']
W/System.err(10709): at
org.javarosa.xpath.expr.XPathPathExpr.getReference(XPathPathExpr.java:
134)
W/System.err(10709): at
org.javarosa.xpath.expr.XPathPathExpr.getReference(XPathPathExpr.java:
71)
W/System.err(10709): at
org.javarosa.model.xform.XPathReference.(XPathReference.java:48)
W/System.err(10709): at
org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1434)
W/System.err(10709): at
org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:425)
W/System.err(10709): at org.javarosa.xform.parse.XFormParser.access
$200(XFormParser.java:77)
W/System.err(10709): at org.javarosa.xform.parse.XFormParser
$3.handle(XFormParser.java:142)
W/System.err(10709): at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:
340)
W/System.err(10709): at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:
351)
W/System.err(10709): at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:
351)
W/System.err(10709): at
org.javarosa.xform.parse.XFormParser.getFormDef(XFormParser.java:297)
W/System.err(10709): at
org.javarosa.xform.parse.XFormParser.getFormDef(XFormParser.java:261)
W/System.err(10709): at
org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:
63)
W/System.err(10709): at
org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:
144)
W/System.err(10709): at
org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:
1)
W/System.err(10709): at android.os.AsyncTask$2.call(AsyncTask.java:
185)
W/System.err(10709): at java.util.concurrent.FutureTask
$Sync.innerRun(FutureTask.java:305)
W/System.err(10709): at
java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err(10709): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1068)
W/System.err(10709): at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:561)
W/System.err(10709): at java.lang.Thread.run(Thread.java:1096)

Do you have any idea what could be the problem. We tried to validate
the XForm file and the only validators we found told us that it is
valid... What are we making wrong?

Thanks in advance
Charlie

charlie,

we only support the javarosa subset of xforms. the documentation below
should help.

https://bitbucket.org/javarosa/javarosa/wiki/xform
https://bitbucket.org/javarosa/javarosa/wiki/buildxforms
http://code.google.com/p/opendatakit/source/browse?repo=forms

you can check javarosa validity using odk validate
http://code.google.com/p/opendatakit/wiki/ODKValidate

yaw

··· On Wed, May 11, 2011 at 04:47, charlie babitt wrote: > Hallo! > > We (a group of students) are currently trying to evaluate ODK Collect > for using it withing a medical enviornment. For doing this, we were > given a sample XForm file (you can find it here http://dpaste.com/hold/541169/). > We tried loading it but ODK Collect died with an exception. So I > installed the Android SDK and used the logcat command to trace the > error: > > I/System.out(10709): Parsing form... > I/System.out(10709): Warning: 2 Unrecognized attributes found in > Element [meta] and will be ignored: [http-equiv,content] Location: > I/System.out(10709): Problem found at nodeset: /html/head/meta > I/System.out(10709): With element content="text/html; charset=UTF-8"/> > I/System.out(10709): Title: "Demographics" > I/System.out(10709): Warning: 1 Unrecognized attributes found in > Element [model] and will be ignored: [id] Location: > I/System.out(10709): Problem found at nodeset: /html/head/model > I/System.out(10709): With element

Hey, may be you are adding "//" somewhere in the form. for example your original path is "/survey/field" and you might be adding "//survey/field".

··· On Wednesday, 11 May 2011 16:47:29 UTC+5, charlie babitt wrote: > Hallo! > > > > We (a group of students) are currently trying to evaluate ODK Collect > > for using it withing a medical enviornment. For doing this, we were > > given a sample XForm file (you can find it here http://dpaste.com/hold/541169/). > > We tried loading it but ODK Collect died with an exception. So I > > installed the Android SDK and used the logcat command to trace the > > error: > > > > I/System.out(10709): Parsing form... > > I/System.out(10709): Warning: 2 Unrecognized attributes found in > > Element [meta] and will be ignored: [http-equiv,content] Location: > > I/System.out(10709): Problem found at nodeset: /html/head/meta > > I/System.out(10709): With element > content="text/html; charset=UTF-8"/> > > I/System.out(10709): Title: "Demographics" > > I/System.out(10709): Warning: 1 Unrecognized attributes found in > > Element [model] and will be ignored: [id] Location: > > I/System.out(10709): Problem found at nodeset: /html/head/model > > I/System.out(10709): With element > > D/dalvikvm(10709): GC_FOR_MALLOC freed 4291 objects / 237904 bytes in > > 24ms > > D/dalvikvm(10663): GC_EXPLICIT freed 1169 objects / 86176 bytes in > > 179ms > > W/System.err(10709): org.javarosa.xpath.XPathUnsupportedException: > > XPath evaluation: unsupported construct [step other than > > 'child::name', '.', '..'] > > W/System.err(10709): at > > org.javarosa.xpath.expr.XPathPathExpr.getReference(XPathPathExpr.java: > > 134) > > W/System.err(10709): at > > org.javarosa.xpath.expr.XPathPathExpr.getReference(XPathPathExpr.java: > > 71) > > W/System.err(10709): at > > org.javarosa.model.xform.XPathReference.(XPathReference.java:48) > > W/System.err(10709): at > > org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1434) > > W/System.err(10709): at > > org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:425) > > W/System.err(10709): at org.javarosa.xform.parse.XFormParser.access > > $200(XFormParser.java:77) > > W/System.err(10709): at org.javarosa.xform.parse.XFormParser > > $3.handle(XFormParser.java:142) > > W/System.err(10709): at > > org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java: > > 340) > > W/System.err(10709): at > > org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java: > > 351) > > W/System.err(10709): at > > org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java: > > 351) > > W/System.err(10709): at > > org.javarosa.xform.parse.XFormParser.getFormDef(XFormParser.java:297) > > W/System.err(10709): at > > org.javarosa.xform.parse.XFormParser.getFormDef(XFormParser.java:261) > > W/System.err(10709): at > > org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java: > > 63) > > W/System.err(10709): at > > org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java: > > 144) > > W/System.err(10709): at > > org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java: > > 1) > > W/System.err(10709): at android.os.AsyncTask$2.call(AsyncTask.java: > > 185) > > W/System.err(10709): at java.util.concurrent.FutureTask > > $Sync.innerRun(FutureTask.java:305) > > W/System.err(10709): at > > java.util.concurrent.FutureTask.run(FutureTask.java:137) > > W/System.err(10709): at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java: > > 1068) > > W/System.err(10709): at java.util.concurrent.ThreadPoolExecutor > > $Worker.run(ThreadPoolExecutor.java:561) > > W/System.err(10709): at java.lang.Thread.run(Thread.java:1096) > > > > > > > > Do you have any idea what could be the problem. We tried to validate > > the XForm file and the only validators we found told us that it is > > valid... What are we making wrong? > > > > Thanks in advance > > Charlie

Charlie,

Your form is no longer at the dpaste so I can't see it. What happens
when you run it through ODK Validate?

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Wed, Mar 5, 2014 at 11:44 PM, mharoonjamil@gmail.com wrote:

On Wednesday, 11 May 2011 16:47:29 UTC+5, charlie babitt wrote:

Hallo!

We (a group of students) are currently trying to evaluate ODK Collect

for using it withing a medical enviornment. For doing this, we were

given a sample XForm file (you can find it here http://dpaste.com/hold/541169/).

We tried loading it but ODK Collect died with an exception. So I

installed the Android SDK and used the logcat command to trace the

error:

I/System.out(10709): Parsing form...

I/System.out(10709): Warning: 2 Unrecognized attributes found in

Element [meta] and will be ignored: [http-equiv,content] Location:

I/System.out(10709): Problem found at nodeset: /html/head/meta

I/System.out(10709): With element <meta http-equiv="Content-Type"

content="text/html; charset=UTF-8"/>

I/System.out(10709): Title: "Demographics"

I/System.out(10709): Warning: 1 Unrecognized attributes found in

Element [model] and will be ignored: [id] Location:

I/System.out(10709): Problem found at nodeset: /html/head/model

I/System.out(10709): With element

D/dalvikvm(10709): GC_FOR_MALLOC freed 4291 objects / 237904 bytes in

24ms

D/dalvikvm(10663): GC_EXPLICIT freed 1169 objects / 86176 bytes in

179ms

W/System.err(10709): org.javarosa.xpath.XPathUnsupportedException:

XPath evaluation: unsupported construct [step other than

'child::name', '.', '..']

W/System.err(10709): at

org.javarosa.xpath.expr.XPathPathExpr.getReference(XPathPathExpr.java:

W/System.err(10709): at

org.javarosa.xpath.expr.XPathPathExpr.getReference(XPathPathExpr.java:

W/System.err(10709): at

org.javarosa.model.xform.XPathReference.(XPathReference.java:48)

W/System.err(10709): at

org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1434)

W/System.err(10709): at

org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:425)

W/System.err(10709): at org.javarosa.xform.parse.XFormParser.access

$200(XFormParser.java:77)

W/System.err(10709): at org.javarosa.xform.parse.XFormParser

$3.handle(XFormParser.java:142)

W/System.err(10709): at

org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:

W/System.err(10709): at

org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:

W/System.err(10709): at

org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:

W/System.err(10709): at

org.javarosa.xform.parse.XFormParser.getFormDef(XFormParser.java:297)

W/System.err(10709): at

org.javarosa.xform.parse.XFormParser.getFormDef(XFormParser.java:261)

W/System.err(10709): at

org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:

W/System.err(10709): at

org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:

W/System.err(10709): at

org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:

W/System.err(10709): at android.os.AsyncTask$2.call(AsyncTask.java:

W/System.err(10709): at java.util.concurrent.FutureTask

$Sync.innerRun(FutureTask.java:305)

W/System.err(10709): at

java.util.concurrent.FutureTask.run(FutureTask.java:137)

W/System.err(10709): at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:

W/System.err(10709): at java.util.concurrent.ThreadPoolExecutor

$Worker.run(ThreadPoolExecutor.java:561)

W/System.err(10709): at java.lang.Thread.run(Thread.java:1096)

Do you have any idea what could be the problem. We tried to validate

the XForm file and the only validators we found told us that it is

valid... What are we making wrong?

Thanks in advance

Charlie

Hey, may be you are adding "//" somewhere in the form. for example your original path is "/survey/field" and you might be adding "//survey/field".

--

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/groups/opt_out.