W3C home > Mailing lists > Public > www-forms@w3.org > April 2000

Re: Parsing Monetary values

From: Gavin McKenzie <gmckenzi@JetForm.com>
Date: Tue, 18 Apr 2000 14:35:45 -0400
Message-ID: <D167ECBA27F2D311A76F00805F6512CA28D7E4@OTTMAIL1>
To: "W3C Public Forms List (Email) (E-mail)" <www-forms@w3.org>
Cc: "'felix@iway.nl'" <felix@iway.nl>

Felix,

Yes, it is recognized that there are different ways to specify the group and
decimal separators in the world.

In the interest of avoiding the ambiguity you have raised, we have chosen to
adopt a single canonical representation for decimal numbers (though this
discussion and the solution also applies to other datatypes, such as the
number datatype).

Group separators (comma in the U.S.) are not permitted, and the decimal
seperator is always a dot.

The XForms datamodel adopts the XML Schema datamodel where possible, and so
you can find the same approach represented in the XML Schema Datatypes
specification, specifically section '3.2.5.1 Lexical representation' see:

http://www.w3.org/TR/xmlschema-2/#decimal

Regards,

Gavin.


-----Original Message-----
From: "IWAY - Felix Faassen" <felix@iway.nl>
To: <www-forms@w3.org>
Date: Tue, 11 Apr 2000 16:29:37 +0200
Subject: Parsing Monetary values

I've got a remark/question concerning the monetary values described in
paragraph 4.4 of the
Xforms data model draft.

The four facets min, max, decimals and currency are clear to me. 
However I see that the value used in the example is notated in US numeric
form which uses the dot as
decimal seperator. However in European and other countries the comma sign is
used as decimal seperator.
(and of course the dot in European countries  is used to indacte number of
thousands and US the comma is used)

Imagine a form submission appears as:

<price>26.315</price>

When you're parsing this monetary value you cannot "see" if we are dealing
with a value 
which says twenty-six thousand three hundred and fifteen or if we mean 26
with as decimals 315.

Is there a way you could figure this out? or do we have to add something to
the
monetary data type ?


Best Regards,


Felix Faassen

--
Felix Faassen (felix@iway.nl)
Iway Technologies BV
Delftechpark 26
2628 XH Delft
The Netherlands
Tel: +31 (0) 15 2600941  
Fax: +31 (0) 15 2600942
URL: http://www.iway.nl
-----------------------------------------------------
XML + Forms = InternetForms 
Powerful legally binding transactions on the Internet. 
------------------------------------------------------
Received on Tuesday, 18 April 2000 14:35:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:47 GMT