I took a look at the semantics used by XBRL for currency amounts (a standard for corporate financial reporting pushed among others by the SEC).

I have made an adaptation of them in semantic XHTML: http://microformats.org/wiki/currency-formats#XBRL (without incorporating existing thoughts on currency, just for the sake documenting just XBRL).

What's nice about these semantics is that:

   * In XBRL, a currency is just another simple unit of measure.
   * In XBRL, a unit of measure can be simple or complex. A simple unit
     of measure if for instance "feet" or "Dollars" while a complex
     unit of measure is "Euros per share".
   * Units of measurement can be specified anywhere in the XBRL
     document and assigned a unique identifier, then referred to from
     numerical facts.

Here are two examples from the page. The globally defined currency relies on an empty anchor. I don't know if anyone has an opinion about using anchors this way.

Locally defined currency:

<span class="price">100 <span class="unit">GBP</span></span>

Globally defined currency:

<span id="u1" class="unit">GBP</span>
...
<span class="price">100<a href="#u1" rel="unit"/></span>

If we incorporate some of the patterns that seem to emerge from the brainstorming page, we could have:

Locally defined currency:

<span class="price">100 <span class="unit currency" 
title="GBP">&#163;</span></span>

Globally defined currency:

Amounts in <span id="u1" class="unit currency" title="GBP">&#163;</span>
...
<table>
<tr>
<td>...</td>
<td>100<a href="#u1" rel="unit"/></td>
</tr>
</table>

Let me know what you think.

Guillaume






_______________________________________________
microformats-discuss mailing list
[email protected]
http://microformats.org/mailman/listinfo/microformats-discuss

Reply via email to