getodk / validate

ODK Validate is a Java application for confirming that a form is valid and compliant with the ODK XForms specification. Contribute and make the world a better place! ✨🔍✨
https://docs.getodk.org/validate/
Other
9 stars 26 forks source link

Validate forms with itemsets using external instances and custom refs #86

Closed lognaturel closed 2 years ago

lognaturel commented 2 years ago

JavaRosa can now parse forms without their secondary instances so remove the stub with a fixed structure.

Addresses issue described in https://github.com/XLSForm/pyxform/pull/577, https://github.com/getodk/validate/pull/68

What has been done to verify that this works as intended?

Added a test form definition with custom name and label refs. Ran Validate manually and tried forms from https://github.com/getodk/validate/issues/65 and https://github.com/getodk/validate/issues/73

Why is this the best possible solution? Were any other approaches considered?

It leverages JavaRosa's new behavior with minimal interference. I can't think of an alternative.

Are there any risks to merging this code? If so, what are they?

It changes the way external secondary instances are handled so there's a risk they're not supported as expected anymore.