[uf-discuss] First version of Currency proposal
lachlan.hunt at lachy.id.au
Wed Oct 11 18:39:36 PDT 2006
Guillaume Lebleu wrote:
> Please find it at: http://microformats.org/wiki/currency-proposal
For tables of currency, I don't like the global definition method
suggested. Tables cells have the scope and headers attributes
available, so we should use them where possible.
See, for example, this table of exchange rates, where each column
represents one currency.
The top row of headers could be marked up like this (ignoring the links
they also use for simplicity):
<th scope="col"><abbr class="currency" title="USD">US$</abbr></th>
Then every cell in that column can now automatically be a unit given in
USD, and there is no need for the extra complexity of the include pattern.
(It could also be implemented using the headers attribute on each cell,
referencing the <th> using its ID.)
For referencing a unit defined elsewhere in the document, so that you
don't have to give it for every occurrence (especially where it's not
within a table like that above), the WHATWG is defining the Web Apps
spec a nice feature using <dfn> and <abbr>.
This is the defining instance of the unit:
<dfn><abbr class="currency unit" title="AUD">$</abbr></dfn>39.00
And this is a cross reference to that in the same document:
Finally, I don't think the <span class="amount"> is necessary at all.
The spec can just define that everything within <span class="money">,
excluding the "currency" and "unit" values, is the amount. We need to
be careful not to add too many spans and classes everywhere, because it
only makes the microformat harder to use.
More information about the microformats-discuss