Relative nodeset attribute in binding

Hi,

I've been looking at the (XML code of) the complex eIMCI sample form posted
in the repo and wanted to double check if the relative nodeset attributes
used in the bindings are considered proper (I suspect they are), and if so
what the rules for this are. It's first form I encountered with this usage
and I remember reading something about this particular form no longer being
considered valid in the new ODK Aggregate.

E.g. <bind nodeset="tmp/normalized/classification/diarrhea" ....> is used
instead of <bind nodeset="*/imci/*tmp/normalized/classification/diarrhea"
....>

The JavaRosa wiki (https://bitbucket.org/javarosa/javarosa/wiki/xform)
states that "for expressions inside attributes in a , the context
node is the node defined in the nodeset attribute of that
but it is
does not clarify that the nodeset attribute itself may contain relative
paths and if so what the rules for this are.

If this use in eIMCI.xml is indeed correct, is the context node of a
relative nodeset attribute of a binding ALWAYS the only child of
?
(like it is for top-level form controls outside of a group or
repeat)

Cheers,
Martijn

It is recommended that you use the full path, as there are other versions
of the Javarosa parser (the underlying engine that understands XForms)
written by various groups that support multiple elements and
better XPath filtering expressions for itemsets.

As soon as the core Javarosa team and those groups coordinate to fold their
changes back into the main Javarosa branch, and they become part of the
main release of Javarosa, we'll update ODK Collect to use them, and then
you might begin to have problems if you don't use the full path.

Mitch

··· On Tue, May 22, 2012 at 10:57 AM, Martijn van de Rijdt wrote:

Hi,

I've been looking at the (XML code of) the complex eIMCI sample form
posted in the repo and wanted to double check if the relative nodeset
attributes used in the bindings are considered proper (I suspect they are),
and if so what the rules for this are. It's first form I encountered with
this usage and I remember reading something about this particular form no
longer being considered valid in the new ODK Aggregate.

E.g. <bind nodeset="tmp/normalized/classification/diarrhea" ....> is used
instead of <bind nodeset="*/imci/*tmp/normalized/classification/diarrhea"
....>

The JavaRosa wiki (https://bitbucket.org/javarosa/javarosa/wiki/xform)
states that "for expressions inside attributes in a , the context
node is the node defined in the nodeset attribute of that
but it
is does not clarify that the nodeset attribute itself may contain relative
paths and if so what the rules for this are.

If this use in eIMCI.xml is indeed correct, is the context node of a
relative nodeset attribute of a binding ALWAYS the only child of
?
(like it is for top-level form controls outside of a group
or repeat)

Cheers,
Martijn

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks Mitch!

I'll probably not include support for relative nodeset attributes in
bindings in my data entry web app then. Multiple s .....
interesting.....

Cheers,
Martijn

··· On Tuesday, May 22, 2012 1:16:32 PM UTC-6, Mitch wrote: > > It is recommended that you use the full path, as there are other versions > of the Javarosa parser (the underlying engine that understands XForms) > written by various groups that support multiple elements and > better XPath filtering expressions for itemsets. > > As soon as the core Javarosa team and those groups coordinate to fold > their changes back into the main Javarosa branch, and they become part of > the main release of Javarosa, we'll update ODK Collect to use them, and > then you might begin to have problems if you don't use the full path. > > Mitch > > On Tue, May 22, 2012 at 10:57 AM, Martijn van de Rijdt wrote: > >> Hi, >> >> I've been looking at the (XML code of) the complex eIMCI sample form >> posted in the repo and wanted to double check if the relative nodeset >> attributes used in the bindings are considered proper (I suspect they are), >> and if so what the rules for this are. It's first form I encountered with >> this usage and I remember reading something about this particular form no >> longer being considered valid in the new ODK Aggregate. >> >> E.g. is used >> instead of > ....> >> >> The JavaRosa wiki (https://bitbucket.org/javarosa/javarosa/wiki/xform) >> states that "*for expressions inside attributes in a , the context >> node is the node defined in the nodeset attribute of that * but it >> is does not clarify that the nodeset attribute itself may contain relative >> paths and if so what the rules for this are. >> >> If this use in eIMCI.xml is indeed correct, is the context node of a >> relative nodeset attribute of a binding *ALWAYS the only child of >> ?* (like it is for top-level form controls outside of a group >> or repeat) >> >> Cheers, >> Martijn >> >> >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitchellsundt@gmail.com >

On Tuesday, May 22, 2012 1:16:32 PM UTC-6, Mitch wrote:

It is recommended that you use the full path, as there are other versions
of the Javarosa parser (the underlying engine that understands XForms)
written by various groups that support multiple elements and
better XPath filtering expressions for itemsets.

As soon as the core Javarosa team and those groups coordinate to fold
their changes back into the main Javarosa branch, and they become part of
the main release of Javarosa, we'll update ODK Collect to use them, and
then you might begin to have problems if you don't use the full path.

Mitch

On Tue, May 22, 2012 at 10:57 AM, Martijn van de Rijdt mrijdt@gmail.comwrote:

Hi,

I've been looking at the (XML code of) the complex eIMCI sample form
posted in the repo and wanted to double check if the relative nodeset
attributes used in the bindings are considered proper (I suspect they are),
and if so what the rules for this are. It's first form I encountered with
this usage and I remember reading something about this particular form no
longer being considered valid in the new ODK Aggregate.

E.g. <bind nodeset="tmp/normalized/classification/diarrhea" ....> is used
instead of <bind nodeset="*/imci/*tmp/normalized/classification/diarrhea"
....>

The JavaRosa wiki (https://bitbucket.org/javarosa/javarosa/wiki/xform)
states that "for expressions inside attributes in a , the context
node is the node defined in the nodeset attribute of that
but it
is does not clarify that the nodeset attribute itself may contain relative
paths and if so what the rules for this are.

If this use in eIMCI.xml is indeed correct, is the context node of a
relative nodeset attribute of a binding ALWAYS the only child of
?
(like it is for top-level form controls outside of a group
or repeat)

Cheers,
Martijn

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com