[uf-discuss] 'currency' microformat straw-man proposal.

Andy Mabbett andy at pigsonthewing.org.uk
Wed Sep 20 16:51:34 PDT 2006


In message <4511CEF0.9070907 at garyjones.co.uk>, Gazza
<gazza at garyjones.co.uk> writes


>>> <span class="currency">
>>>  <span class="type">$</span>
>>>  <span class="value">5.00</span>
>>> </span>
>>  "Dollars" is a currency. "Five Dollars" is money.
>
>No, money is a currency, metal is another type of currency. Dollars is
>a  /type/ of currency.

Even if so, "Five Dollars" is still money, not currency.

>>> (which follows the value excerpting model of using type and value
>>> classes), or, better:
>>  Note sure what you mean here.
>
><http://microformats.org/wiki/hcard#Value_excerpting>

Thank you.

>
>> [...]
>>> even ISO4217 has codes for "currencies" that don't use symbols:
>>>
>>> <span class="currency">
>>>  <span class="value">23</span> ounces of
>>>  <abbr class="type" title="XAG">Gold</abbr>
>>> </span>
>>  "once" would be the "unit", in that case.
>
>Nope - the ISO4217 specifies that XAG is Gold measured in ounces -
>there's no need to replicate a "unit" of ounces anywhere.

I was referring to "unit" as used in my "straw man" proposal. Though it
might be better if "ounces of" were thus marked up.


>One fleeting glimpse I had, though I wouldn't be keen on (but bears
>mentioning for completeness of discussion), might be a subclass of
>money / a method - this could be paper, coins, cheque, etc. Not sure
>how this could be implemented, or even if there's (m)any real-life
>examples to warrant needing this level of detail.

"Send a cheque for £5", though "send a cheque, postal order, or stamps
to the value of £5" may be harder to mark up ;-)

>>> If there was one further issue, perhaps an "amount" class could be used
>>> instead of type & value:
>>>
>>> <span class="currency">
>>>  <span class="amount">£14 6s 4d</span>
>>> </span>
>>>
>>> <span class="currency">
>>>  <span class="amount">50 pence</span>
>>> </span>
>>  Those won't allow a user agent to extract the numeric value, easily.
>
>Agreed, but knew someone might pick up on those examples :o) I suppose
>you could have your "unit" class here:
>
><span class="currency">
>  <span class="amount">
>    <abbr class="unit" title="GBP">£</abbr>14
>    6<abbr class="unit" title="shillings">s</abbr>
>    4<abbr class="unit" title="old pence">d</abbr>
>  </span>
></span>
>
>^^^ There's all sorts of problems with that example,

Not least that "shilling" may not be a British shilling and that the
whole thing is "GBP".

>but you get the general idea.

Yes, but the value in GBP is 14.32 (ish), and that's not there.

The straw-man proposal allows for this:

<span class="money">
   <abbr class="currency" title="GBP">
      <abbr class="amount" title="14.32">
         <abbr class="symbol" title="pound">£</abbr>14
         6<abbr class="symbol" title="shilling">s</abbr>
         4<abbr class="symbol" title="old-penny">d</abbr>
      </abbr>
   </abbr>
</span>


(use of "&pound;" notwithstanding!)
-- 
Andy Mabbett
                Say "NO!" to compulsory ID Cards:  <http://www.no2id.net/>

                Free Our Data:  <http://www.freeourdata.org.uk>


More information about the microformats-discuss mailing list