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

Show error on attempt to treat a nodeset as a single node #267

Open
lognaturel opened this issue Dec 17, 2024 · 0 comments
Open

Show error on attempt to treat a nodeset as a single node #267

lognaturel opened this issue Dec 17, 2024 · 0 comments

Comments

@lognaturel
Copy link
Member

lognaturel commented Dec 17, 2024

This is a controversial proposed deviation from XPath rules. It may not even be practical to consider.

In XPath, when a nodeset is used as a single node, the first node in the nodeset is silently used. This can hide form design problems that will only show up at the analysis stage.

See this form for example: https://test.getodk.cloud/#/projects/149/forms/field_repeated/draft/preview

Collect shows an error in that case: https://docs.getodk.org/collect-troubleshooting/#multiple-values-from-a-dataset-used-as-a-single-value

The error needs some work but it does at least alert people to the fact that something is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant