Re: Parsing Monetary values

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 UTC