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.
http://au.finance.yahoo.com/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>.
e.g.
This is the defining instance of the unit:
<span class="money">
<dfn><abbr class="currency unit" title="AUD">$</abbr></dfn>39.00
</span>
And this is a cross reference to that in the same document:
<span class="money"><abbr>$</abbr>42.00</span>
http://www.whatwg.org/specs/web-apps/current-work/#the-dfn
http://www.whatwg.org/specs/web-apps/current-work/#the-abbr
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.
--
Lachlan Hunt
http://lachy.id.au/
_______________________________________________
microformats-discuss mailing list
microformats-discuss@microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss