Decimal Trouble

wxdqz

New Member
I have the following restriction base which is working correct. It is allowing a max of 10 characters with 2 decimal places i.e 8 digits followed by 2 decimals.

<xs:simpleType name="defaultDecimal">
<xs:restriction base="xs:decimal">
<xs:totalDigits value=http://www.webdeveloper.com/forum/archive/index.php/"10"/>
<xs:fractionDigits value="2"/>
</xs:restriction>
</xs:simpleType>

The problem I have is that instead of using a . as a decimal point the user has to use a , (comma). If I change my type to string how do I write a pattern where the user must enter <=8 digits then a comma followed by 2 decimal places

e.g the user could enter any of the following
12,33
1,1
,1
,12
12345678,12

Your help would be greatly appreciated.
 
Top