enketo / enketo-validate

An ODK XForm validator around the Enketo form engine.
https://enketo.org
Apache License 2.0
3 stars 11 forks source link

validate URIs/URLs #41

Open MartijnR opened 5 years ago

MartijnR commented 5 years ago

external data, media resources

The spec info is here: http://getodk.github.io/xforms-spec/#uris but in addition we consider http(s):// URLs valid too.

MartijnR commented 2 years ago

See Develop for guidance on running this tool locally.

Here is an XForm (extension changed to txt to work around GitHub restriction) that can be used during development (and to add a test spec) that contains several valid and invalid URLs:

  1. external <instance> data references i.e. <instance src="....">, always as children of <model>, and
  2. image resources i.e. <value form="image">, always under model/itext/translation/text/value as textContent

Create a PR that:

If you get stuck trying to 'find' the media resources, don't worry about it (and don't spend too much time) and just do the <instance> elements with a src attribute only.