[uf-new] Finishing Currency

Guillaume Lebleu gl at brixlogic.com
Fri Sep 28 17:13:13 PDT 2007


Andy Mabbett wrote:
> I don't see anything like "1 cent is 1/100th of a US dollar" on that page.
Indeed, in this case, the unit defined is "$ in thousands", but I 
believe this is a similar enough case. One way to mark this up would be to:

    * Define a unit called, say "KUSD". For instance <span id="#KUSD"
      class="unitdef"><abbr class="currency" title="USD"><abbr
      class="unit" title="dollar">$</abbr></abbr> in <abbr class="scale"
      title="1000">1000s</abbr></span> (brainstorming...)
    * Refer to this unit in <td>, for instance <td class="hmoney"><span
      class="value">40,494</span><a href="#KUSD" class="unit"/></td>

Probably not the most efficient as every single cell has to be marked 
up. Maybe you see a better way.
>
> You didn't answer my question; 
Coming back to the original discussion, with the "500 grams" example, I 
think a publisher would rather publish:

<span class="weight"><span class="value">500</span> <abbr class="unit" 
title="g">grams</abbr></span>

Or maybe <span class="weight"><span class="value">500</span> <abbr 
class="unit" title="0.001 kg">grams</abbr></span>, but this may not work 
for more complex composite units like meter square per second.

But a parser would probably like to know that:

"<span class="unitdef">1 <span class="unitname">g</span> is <abbr 
class="scale" title="0.001">1/1000th</abbr> of a <abbr class="unit" 
title="kg">kilogram</abbr></span>
> and your example has titles on spans. How do you think they would work?
Corrected: <span class="hmoney">10 <abbr class="unit" title="cent"><abbr 
class="currency" title="USD">cents</abbr></abbr></span>
>
> So are you now retracting your suggestion that publishers include such 
> statements on their pages?
>
As far as publishers are concerned, in cases such as "grams", these unit 
definition statements will not be valuable. But in cases such as "$ in 
thousands" or "$ per share", I believe they will have to markup these 
definitions, and so we need (possibly not now, but surely at some point) 
to provide ways to markup what are essentially custom composite unit 
definitions.

If we have a way to define custom composite units, then we might want to 
use it to define commonly used composite units, publish these 
definitions so that they can be used by parsers. These definitions don't 
have to be published by all publishers, one at a minimum.

I'm not retracting my suggestion, simply saying that we can defer the 
problem of custom composite units definition to a later time and focus 
on standard units (ex. UNECE units) for now, if everyone agrees that the 
Google Financials example of a custom composite unit definition is a 
relatively rare occurence.

Guillaume




More information about the microformats-new mailing list