Skip to content
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

resolve ${x} names to corresponding XML path reference in custom settings attributes #717

Open
tiritea opened this issue Sep 3, 2024 · 0 comments

Comments

@tiritea
Copy link

tiritea commented Sep 3, 2024

Software and hardware versions

all

Problem description

Unlike custom instance, binding or body attributes, specifying a ${x} style question reference for custom settings attributes is not resolved to the corresponding XML path reference.

Steps to reproduce the problem

Create a new XLSForm and add a custom attribute - eg attribute::xyz - to the settings page, as described here: https://xlsform.org/en/#advanced-use-and-extensibility

For the value of the custom attribute, put a ${x} style reference to one of the questions in your form, eg "${name}"

After passing the form thru pyxform, the resulting attribute that is added to the root element in the resulting XML form is just an unmodified copy of this string; eg

<data customSettingsAttribute2="${name}" ...>
...
</data>

Expected behavior

The desired/expected behavior is that this ${name} reference would be resolved to the corresponding XML path for the element; eg

<data customSettingsAttribute2="/data/name" ...>
...
</data>

much as occurs already for custom instance, binding or body attributes.

Other information

There is an extensive discussion of this issue, with examples, on the ODK Forum here: https://forum.getodk.org/t/xlsform-spec-also-resolve-foo-names-in-custom-settings-attributes/48735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant