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

Correct description for uuid() with argument #274

Closed MartijnR closed 3 years ago

MartijnR commented 4 years ago

As @alxndrsn discovered, a GUID and UUID are the same and should be 128 bits, so it probably say something like:

Without arguments, it returns a random RFC 4122 version 4 compliant UUID. With an argument it returns a random string with the provided number of characters.

MartijnR commented 4 years ago

Javarosa: https://github.com/GetODK/javarosa/blob/59611cc0755dfbaf6631866ff15d6a9a516df704/src/main/java/org/javarosa/core/util/PropertyUtils.java#L60-L66

It would have been better to not support an argument for uuid() and create a new function for a random string of a custom length instead. But presumably, we'll have users that are using an argument.

lognaturel commented 3 years ago

It would have been better to not support an argument for uuid() and create a new function for a random string of a custom length instead. But presumably, we'll have users that are using an argument.

Agreed. Unfortunately, the uuid(len) variant has been there since the beginning of time.