-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger referring to repeat question has relative ref attribute #477
Comments
Thanks, @MartijnR, this makes sense. I think the Validate issue is actually the same one -- currently the ref is being contextualized against the root so |
Thank you. That's very good, as we don't have to feel so bad about not supporting that in Enketo then! 👍 😆 |
One of our developers at OpenClinica can work on this. @gushil - Please take a look. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Software and hardware versions
Last commit in master of Oct 29th, 2020
Problem description
If a trigger refers to a question inside a repeat, the
ref
attribute value is relative. Though this is strictly speaking correct in XForms, in pyxform we've so far always used absolute references and could do so in this case too. This would be more consistent. The real problem is that a relative reference doesn't work in Enketo is not so easy to add support for.Steps to reproduce the problem
This form doesn't pass ODK Validate (different issue) so run with
--skip_validate
.The output contains
<setvalue event="xforms-value-changed" ref=" ../three " value="concat('d', 'e')" />
Note the inconsistency with the other ref attributes in the same body that are all absolute including the
three
question itself.Desired behavior
The desired output would contain
<setvalue event="xforms-value-changed" ref=" /data/rep/three " value="concat('d', 'e')" />
instead.Additional information
Both
ref="/data/rep/three"
attributes in the (desired) output refer to the same node (in the current repeat instance). They are binding expressions. As far as I can tell they have the exact same meaning in XForms.The text was updated successfully, but these errors were encountered: