[uf-discuss] First version of Currency proposal

Emiliano Martinez Luque martinezluque at gmail.com
Wed Oct 11 18:55:13 PDT 2006


My message with corrected markup. Please disregard the other one.

Regarding the Straw man proposal, the symbol class seems to be
unnecesary since the symbol in most price representations is just a
convention to define which currency we are speaking of. So there is no
actual need to explicitly mark it up as such, since User agents can
(quite simply) derive it from the ISO code in any transformations that
they might need to do. This is so, regardless of whether the symbol is
present or not in the actual text. ie:

<span class="money">
<abbr class="currency symbol" value="USD">$</abbr><abbr class="amount"
title="100.99">100 and 99 cents</abbr>
</div>

Can be interpreted the same way by the User Agent as:

<span class="money">
<abbr class="currency" value="USD">$</abbr><abbr class="amount"
title="100.99">100 and 99 cents</abbr>
</div>

Since the currency symbol can be derived from the ISO Currency code.

The same thing can be said of the unit class in both proposals.
Guillaume's example from his last mail:

<span class="money"><span class="amount">70</span> <abbr
class="currency" title="USD">US</abbr> <abbr class="unit"
title="cent">cents</abbr></span>


Can be Marked up, quite consistently as:

<span class="money"><abbr class="amount" title="0.70">70</abbr> <abbr
class="currency" title="USD">US</abbr> cents</span>

Since 0.70 USD is 70 cents. Remember that there might be text within a
microformat that is to be discarded by a User Agent.  An example of
this from the hCard specification:

<span class="tel"><span class="type">Home</span> (<span
class="type">pref</span>erred):
 <span class="value">+1.415.555.1212</span>
</span>

The "erred):" text outside the type proprety is to be discarded by the
User Agent.

One thing I notice is that both in the Straw man proposal and in
Gillaume's one, there is still the problem of how amounts are
differently expressed across different countries. ie: 1,000.99 or
1.000,99 to represent a thousand and 99 cents of the currency.

Has any thought been given of linking this to the language definition
of the document (similar to the way that OSs handle locale)?. Ie:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
....
....
On Sale now for: <span class="money">
<abbr class="currency" title="EUR">€</abbr><abbr class="amount">100.99</abbr>
</span>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es-AR" lang="es-AR">
....
....
Oferta: <span class="money">
<abbr class="currency" title="EUR">€</abbr><abbr class="amount">100,99</abbr>
</span>

Should both be understood as 100.99 EUR.

And If some markup falls outside the scope of the locale it can be
explicitelly marked up with the amount class.

What do you think of this idea? Does any other solution has been
proposed for this problem?

Emiliano Martínez Luque

PS: Sorry about the other mail.


More information about the microformats-discuss mailing list