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

RE: Currency Element Suggestion

From: Paul Nelson (ATC) <paulnel@winse.microsoft.com>
Date: Thu, 9 Aug 2007 05:56:26 -0700
Message-ID: <49C257E2C13F584790B2E302E021B6F90ECD1FDF@winse-msg-01.segroup.winse.corp.microsoft.com>
To: Richard Markette <rmarkette@pinnaclemail.com>, <www-html@w3.org>
CC: Thomas Donohoe <tdonohoe@pinnaclemail.com>

> 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.
 
Something else a browser is supposed to do...contact other sites and extract conversion data. I don't think this is a core thing a browser needs to be involved with. It seems more like some type of event that a server side solution might want to do...if they can guess what the user really wants to see.
 
In some cases a user might want to know the currency of the transaction. In other cases a user might want the local currency. How is a browser or server supposed to figure this out?
 
Why not provide the currency in the transaction currency amount in a link to Oanda, e.g.
 
<p>The company's stock sold for <a href="http://www.oanda.com/convert/classic">5.26 USD</a> per share.</p>
 
I think that Oanda even provides a service that would link one to get currency conversion if one desired to do that for their customers/users.
 
This is a great idea for a service that does not necessarily need more markup added to HTML.
 
Paul

________________________________

From: www-html-request@w3.org on behalf of Richard Markette
Sent: Thu 8/9/2007 5:21 AM
To: www-html@w3.org
Cc: Thomas Donohoe
Subject: Currency Element Suggestion




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>


CURRENCY

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

Conversion:
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.


Attributes:

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 13:01:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:10 GMT