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

add 2nd XForm validator option #163

Closed
MartijnR opened this issue Dec 7, 2017 · 3 comments
Closed

add 2nd XForm validator option #163

MartijnR opened this issue Dec 7, 2017 · 3 comments

Comments

@MartijnR
Copy link
Contributor

MartijnR commented Dec 7, 2017

I'm in the process of building an Enketo-form-engine-based nodeJS XForm validator. I hope you will agree this will nicely enrich the ODK ecosystem (assuming it's done fairly well). I think the command line interface will be identical to ODK Validate.

The main reason for this project is that some adopters use customized Enketo engines with custom XPath functions (and they'll be using a custom version of the new validator).

This issue is to discuss adding a 2nd validator option to pyxform with a configuration item to swap from ODK Validate to the new validator. The default would remain ODK Validate.

Please let me know if you any ideas, comments, concerns!

@lognaturel
Copy link
Contributor

Could warning rather than throwing an error on missing function address the problem at least in the short term? getodk/validate#35 It seems this could be a simpler approach though it does have the downside of pushing the validation of actual function names to the client.

@MartijnR
Copy link
Contributor Author

Thanks for bringing that up. That development would help some people with being able to at least use custom functions.

However, one difficulty is with training users that some 'function not supported' warnings are okay and others are not. They also would miss out on parameter checks for those function calls.

I think, generally it is better to output an error for the use of unsupported XPath functions (if the validator kept up-to-date with the spec).

lindsay-stevens added a commit to lindsay-stevens/pyxform that referenced this issue Dec 15, 2017
- As mentioned in XLSForm#163
- More or less the same as odk_validate setup, except:
  - enketo validate is optional, defaulting to not running it
  - requires node instead of java
@MartijnR
Copy link
Contributor Author

Here's a web interface around the new validator (and also ODK validate): https://validate.enketo.org/. Comments welcome here: https://github.com/enketo/enketo-validate/issues

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

2 participants