W3C home > Mailing lists > Public > www-html@w3.org > August 2007

Currency Element Suggestion

From: Richard Markette <rmarkette@pinnaclemail.com>
Date: Wed, 8 Aug 2007 17:21:01 -0400
Message-ID: <59664F4143B2354A93B53DA073A346D802C6866D@s4zjaxns06e3.pinnacle.local>
To: <www-html@w3.org>
Cc: "Thomas Donohoe" <tdonohoe@pinnaclemail.com>

A suggestion for a element that designates a currency amount.
I was imagining this INLINE element working something like this:

<p>The company's stock sold for a <currency value="5.26"
date="16/11/2004" origin="US" localize comma paren /> per share.</p>


The browser is to render the amount of money specified in the VALUE. The
browser is to perform two distinct actions: Conversion and Formatting.

The VALUE is to be displayed in the appropriate amount and format for
the users local currency. This would require the browser to of its own
accord contact a currency conversion server to determine the appropriate
amount to display in the users local currency based on the exchange rate
on the date provided in the date attribute. This conversion would only
occur if the "localize" flag is present.

Formatting Currency:
The presentation of the VALUE is to be formatted according to the rules
of the local or origin country currency rules.

Note that no end tag is present as this is browser created display
content similar to the way HR tags work.


VALUE: the amount of money to display and to base all calculations. This
value must be completely numeric.

DATE: the date of reference for the currency exchange. If omitted, the
current date is used. A standard definition of the DATE value would be
required (determining if it is to be included in MM/DD/YYYY format or
DD/MM/YYYY format).

LOCALIZE: if present, the browser should convert the VALUE provided. If
omitted, display the VALUE in the proper monetary formatting for the
provided "ORIGIN"

ORIGIN: This determines what country the VALUE is specific to and from
which all conversions are to be derived. A standard abbreviation table
would be used so that all browsers will recognize the appropriate
country. If omitted, no conversion or formatting would take place and
the VALUE would be displayed to the user as a standard number.

COMMA: This determines if commas should be used in displaying the
formatted version of the VALUE. If omitted, commas are NOT used.

PAREN: For accountant format, if the PAREN attribute is present, a
negative VALUE will be displayed with encapsulating parentheses. If
omitted, a negative value will be displayed with a preceding hyphen.

Thank you for your attention,
Richard Markette
Webmaster, SHOP4ZERO.com
Received on Thursday, 9 August 2007 11:52:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:16 UTC