VOUnits update: Empty/missing units
Mark Taylor
m.b.taylor at bristol.ac.uk
Thu Dec 16 17:40:08 CET 2021
Norman,
there appear to be two versions of this email that went to the list;
I'm following up the more recent one.
On Mon, 13 Dec 2021, Norman Gray wrote:
> I think there are a couple of inter-related issues here, each of which is rather nit-picking, but each of which is irritating to the author of a document such as this.
>
> 1. Do people _know_ that an empty string 'positively indicates that the corresponding quantity is dimensionless'? I think the answer is 'very probably not', and that, in contrast, "" is the sort of thing that might reasonably appear in a units column by accident or by default.
>
> 2. If I were filling in metadata about a table, without reading the document (but what sort of barbarian would ever do that...?), it might seem to me reasonable to drop in an empty string to mean 'nothing known, or I don't care', or a system might default an empty string in this case. Thus "1" has the _virtue_ of being slightly non-obvious, enough to prompt whatever is validating an input of "" to ask 'do you mean unitless or don't-care?'
Agree.
> So, to be clear, I think my proposal is:
>
> * Have the VOUnits 'explicitly dimensionless' marker become "1" rather than "" (on the grounds that the latter is too easily confusable with NULL/don't know), for the benefit of those metadata authors who wish to explicitly mark this.
>
> * Adjust the grammars (only VOUnits, or all of them?) to remove the two-step parse, by permitting parse(<dimensionless marker>) to produce an appropriate valid result.
I'd be OK with that. I think it might be slightly surprising
for people (who haven't read VOUnits 1.1) to come across "1" in the
units metadata, but I doubt if it's really going to confuse or
mislead anybody.
> Finally, and as Markus said in the first message in this thread, is there any case for adding a third possibility: dimensionless / unknown / not-a-quantity (eg a name)? That would be very easy to do in this revision of the document, and would mean that 'the units field must be non-NULL' would become a reasonable validation requirement. But this might be too much detail to hope metadata authors will supply.
I would prefer not. Whatever the VOUnits document says, I'm pretty sure
that people will omit an explicit value for the units in many cases
where no unit is suitable, and consider themselves justified in doing so.
Making that an error is just going to have the effect of keeping the
validators busy while (most) real unit consumers take no-unit-string
to mean something sensible.
Mark
--
Mark Taylor Astronomical Programmer Physics, Bristol University, UK
m.b.taylor at bristol.ac.uk http://www.star.bristol.ac.uk/~mbt/
More information about the semantics
mailing list