[uf-new] Measurement brainstorming (was: Measure & currency)

Andy Mabbett andy at pigsonthewing.org.uk
Fri Sep 28 08:29:30 PDT 2007

In message
<e86992a40709280700w3f0a110etee6409cbd74692d4 at mail.gmail.com>, Frances
Berriman <fberriman at gmail.com> writes

>On 28/09/2007, Andy Mabbett <andy at pigsonthewing.org.uk> wrote:
>> I think we could, if we put our collective mines to it, have first-draft
>> currency (even if only for current, decimal currencies) and measurement
>> (even if only for metric values) microformat in a few weeks (and, again,
>> doing so before Firefox 3 goes live would be A Good Thing [TM]). Surely
>> no-one can deny the evidence that such data is widely published?
>Okay.  I'm following you on this.   Recipe will definitely need
>weights and measures in some form, so lets look at that in it's self
>first in it's simplest form, after all a recipe pretty much is just 2
>things (a list of stuff you need and how to put that stuff together).

At its simplest form, measure can be:

        <span class="hmeasure">
          <span class="quantity">[number]</span>
          <span class="unit">[SI unit]</span>

Where SI unit is, for example, "kg"; or "kilogram". SI units are listed



Which leaves the issues:

   *    Common, non-SI names of units

   *    Compound units ("meters per second")

   *    Units with superscripts. e.g. square metres

   *    Case-sensitivity (S = electrical conductance; s= seconds)

Given the above, and publishing good practice, perhaps units should be
marked up as:

        <abbr class="unit" title="kilogram">kg</abbr>

        <abbr class="unit" title="kilogram">kilo.</abbr>

        <abbr class="unit" title="newton-second">N.s</abbr>

        <abbr class="unit"

maybe with plural values allowed:

        <abbr title="kilograms">kg</abbr>

We can later consider:

   *    How do we deal with non-metric units ("miles", "inches")

           *   do standard names/ abbreviations exist?

           *   what about, for example, imperial vs. US Gallons

Parser writers could choose to recognise only metric units, or only
simple units (so kilometre, but not "newton-second").

This system would be extensible, as publishers and parsers could use
other units, and parsers SHOULD ignore any they don't know.

(The above can be considered a "straw man".)

>I think there is value in correctly marking weight/volume values for
>various interesting purposes (conversion, ordering, comparison etc.)
>in a recipe.  We'll work out when we've done the recipe research work
>whether it's actually appropriate to use "measure" or "currency" when
>we get to that stage of the process.

My mention of "currency" was not in relation to recipe; I'll comment
further in a separate post, to sub-divide the thread by topic

...though currency could be a subset of "hMeasure", with currency codes
as units:

        <span class="hmeasure">
          <abbr class="unit" title="USD">$</abbr>
          <span class="quantity">5</span>

>There's hardly any examples for measure at the moment, so there's a
>fair bit of work to be done there (nothing for recipes at least,
>unless you want to say how fast your eggs were laid!).

It shouldn't take long to find examples of measurements on-line; there
are rather a lot; but we should also bear in mind that standards for
their use already exist.

>I also concur with the difficulty of saying what a "pinch", "handful",
>"to taste" or "as necessary" (and many others) will end up equating

That's specific to recipes, rather than measurements in general.

>Recipes aren't necessarily concrete values so we'll have to be
>aware of this and not force authors into publishing data they weren't

Agreed. Perhaps we should lobby SI to define such terms ;-)

Andy Mabbett

More information about the microformats-new mailing list