getodk / xforms-spec

The XForms-derived specification used in the ODK ecosystem. If you are interested in building a tool that is compliant with the forms rendered by ODK tools, this is the place to start. ✨⚒✨
https://getodk.github.io/xforms-spec/
30 stars 26 forks source link

Update docs for normalize-space() #243

Closed jkpr closed 5 years ago

jkpr commented 5 years ago

Closes #242.

I matched what was described for string-length.

jkpr commented 5 years ago

Interesting! I am no wizard 🧙‍♂️ so I did not think of that! I was wondering how / why the zero-arg form would be useful.

@lognaturel is planning to get to the zero-arg form eventually. I would do it myself, but I am not certain how to write a good failing test in Javarosa. See my attempt here (down at the bottom is a discussion and link to a git diff on github): https://github.com/opendatakit/javarosa/pull/467

lognaturel commented 5 years ago

Agreed, the spec can match XPath 1.0. In the very short term, JavaRosa/Collect may deviate but that's fine.

So in practice, @jkpr, that just means saying "As in XPath 1.0" with the link to the reference. Sorry I didn't think of that decision point!

MartijnR commented 5 years ago

Great.

(Now, of course, I'm wondering if the same could be done for the old string-length()... ;))

lognaturel commented 5 years ago

I'm wondering if the same could be done for the old string-length()

Yes, I was thinking we should clean that up, too. 😊

jkpr commented 5 years ago

Am I understanding correctly, then, that I should change the commit to say:

As in XPath 1.0

instead of updating it when we have the zero-arg form?

lognaturel commented 5 years ago

Exactly, @jkpr. The specification is the ideal that ties all the different tools in the ODK ecosystem together. Sometimes one tool or another may be slightly out of sync with that ideal and in that case, documentation for that specific tool will reflect that reality.

jkpr commented 5 years ago

I didn't know if force updating one commit on this branch would delete this pull request, so I made another pull request: #247.