Decimal point and comma

Hi,

I have this problem validating a powerbuilder exported XML file versus and
XSD using the XMLParseFile function.

I get the following error:

    Error parsing XML document:
    Datatype error: Type:InvalidDatatypeValueException, Message:Value '1,00'
does not match any member types (of the union) .
    d:\interfaces\stockmove\out\S17.C2P, Line: 17, Position: 24.

The tag in question looks as follows: <qtyVal>1,00</qtyVal>

The problem seems to be that a numeric field ( which is part of a union in
the XSD because I need it to allow empty values, which can't be done if it
is defined as xs:decimal ) contains a comma (',') instead of a decimal point
('.').

If I change the 1,00 to 1.00 it works correctly. But since my regional
settings ( and probably the regional settings of all other PC's that are
going to run this application )  have decimal point = , PB formats numbers
with a comma instead of a decimal point.

Additionally if I put 1.00 in the XML file and import it in a datawindow,
the number in the datawindow will be 100 instead of 1.

I guess I could solve this problem by either having the XSD accept a comma
as decimal point, but I don't know how to do this, if it is at all
possible....

OR

I could get PB to save my files in US-format (using a decimal point), which
would be a better solution, but it seems to always use the regional settings
for formatting numbers. Is there a way to have it use US-format even on PCs
with european regional settings?

Any input would be welcome since I've been searching for a solution for a
few days now....

Kind regards,
Roel.


0
Roel
2/23/2004 11:13:48 AM
sybase.powerbuilder.xml 546 articles. 0 followers. Follow

4 Replies
624 Views

Similar Articles

[PageSpeed] 17

Hi again,

In the meantime I've found out that it seems only the . is defined by W3C as
decimal point, so I guess I can drop the solution about making the XSD
accept the , as valid decimal point.

That leaves me with figuring out how I can get PB to import/export decimals
with a . ( period )  as decimal point even when the local settings of my
machine are on , ( comma ).

Any ideas are welcome....

Additionally I'm wondering why PB doesn't save decimals with a . to XML
instead of using the ,. It seems a comma in a decimal is just plain wrong
XML according to the XML-Schema definition on the W3C website. But that's
probably also something I am doing wrong.

Kind regards,
Roel.

"Roel Sergeant" <Roel.Sergeant@pandora.be> wrote in message
news:4039e06c@forums-1-dub...
> Hi,
>
> I have this problem validating a powerbuilder exported XML file versus and
> XSD using the XMLParseFile function.
>
> I get the following error:
>
>     Error parsing XML document:
>     Datatype error: Type:InvalidDatatypeValueException, Message:Value
'1,00'
> does not match any member types (of the union) .
>     d:\interfaces\stockmove\out\S17.C2P, Line: 17, Position: 24.
>
> The tag in question looks as follows: <qtyVal>1,00</qtyVal>
>
> The problem seems to be that a numeric field ( which is part of a union in
> the XSD because I need it to allow empty values, which can't be done if it
> is defined as xs:decimal ) contains a comma (',') instead of a decimal
point
> ('.').
>
> If I change the 1,00 to 1.00 it works correctly. But since my regional
> settings ( and probably the regional settings of all other PC's that are
> going to run this application )  have decimal point = , PB formats numbers
> with a comma instead of a decimal point.
>
> Additionally if I put 1.00 in the XML file and import it in a datawindow,
> the number in the datawindow will be 100 instead of 1.
>
> I guess I could solve this problem by either having the XSD accept a comma
> as decimal point, but I don't know how to do this, if it is at all
> possible....
>
> OR
>
> I could get PB to save my files in US-format (using a decimal point),
which
> would be a better solution, but it seems to always use the regional
settings
> for formatting numbers. Is there a way to have it use US-format even on
PCs
> with european regional settings?
>
> Any input would be welcome since I've been searching for a solution for a
> few days now....
>
> Kind regards,
> Roel.
>
>


0
Roel
2/24/2004 10:41:40 AM
You should log this as a bug via CaseXpress.

-- 
<hopethishelps/>
Roy Kiesler [TeamSybase]
SDN CodeXchange -- http://codexchange.sybase.com

"Roel Sergeant" <Roel.Sergeant@pandora.be> wrote in message
news:403b2a71@forums-2-dub...
> Hi again,
>
> In the meantime I've found out that it seems only the . is defined by W3C
as
> decimal point, so I guess I can drop the solution about making the XSD
> accept the , as valid decimal point.
>
> That leaves me with figuring out how I can get PB to import/export
decimals
> with a . ( period )  as decimal point even when the local settings of my
> machine are on , ( comma ).
>
> Any ideas are welcome....
>
> Additionally I'm wondering why PB doesn't save decimals with a . to XML
> instead of using the ,. It seems a comma in a decimal is just plain wrong
> XML according to the XML-Schema definition on the W3C website. But that's
> probably also something I am doing wrong.
>
> Kind regards,
> Roel.
>
> "Roel Sergeant" <Roel.Sergeant@pandora.be> wrote in message
> news:4039e06c@forums-1-dub...
> > Hi,
> >
> > I have this problem validating a powerbuilder exported XML file versus
and
> > XSD using the XMLParseFile function.
> >
> > I get the following error:
> >
> >     Error parsing XML document:
> >     Datatype error: Type:InvalidDatatypeValueException, Message:Value
> '1,00'
> > does not match any member types (of the union) .
> >     d:\interfaces\stockmove\out\S17.C2P, Line: 17, Position: 24.
> >
> > The tag in question looks as follows: <qtyVal>1,00</qtyVal>
> >
> > The problem seems to be that a numeric field ( which is part of a union
in
> > the XSD because I need it to allow empty values, which can't be done if
it
> > is defined as xs:decimal ) contains a comma (',') instead of a decimal
> point
> > ('.').
> >
> > If I change the 1,00 to 1.00 it works correctly. But since my regional
> > settings ( and probably the regional settings of all other PC's that are
> > going to run this application )  have decimal point = , PB formats
numbers
> > with a comma instead of a decimal point.
> >
> > Additionally if I put 1.00 in the XML file and import it in a
datawindow,
> > the number in the datawindow will be 100 instead of 1.
> >
> > I guess I could solve this problem by either having the XSD accept a
comma
> > as decimal point, but I don't know how to do this, if it is at all
> > possible....
> >
> > OR
> >
> > I could get PB to save my files in US-format (using a decimal point),
> which
> > would be a better solution, but it seems to always use the regional
> settings
> > for formatting numbers. Is there a way to have it use US-format even on
> PCs
> > with european regional settings?
> >
> > Any input would be welcome since I've been searching for a solution for
a
> > few days now....
> >
> > Kind regards,
> > Roel.
> >
> >
>
>


0
Roy
2/24/2004 1:55:18 PM
Ok thanks Roy,

Will do....

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:403b57d2$1@forums-2-dub...
> You should log this as a bug via CaseXpress.
>
> -- 
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> SDN CodeXchange -- http://codexchange.sybase.com
>
> "Roel Sergeant" <Roel.Sergeant@pandora.be> wrote in message
> news:403b2a71@forums-2-dub...
> > Hi again,
> >
> > In the meantime I've found out that it seems only the . is defined by
W3C
> as
> > decimal point, so I guess I can drop the solution about making the XSD
> > accept the , as valid decimal point.
> >
> > That leaves me with figuring out how I can get PB to import/export
> decimals
> > with a . ( period )  as decimal point even when the local settings of my
> > machine are on , ( comma ).
> >
> > Any ideas are welcome....
> >
> > Additionally I'm wondering why PB doesn't save decimals with a . to XML
> > instead of using the ,. It seems a comma in a decimal is just plain
wrong
> > XML according to the XML-Schema definition on the W3C website. But
that's
> > probably also something I am doing wrong.
> >
> > Kind regards,
> > Roel.
> >
> > "Roel Sergeant" <Roel.Sergeant@pandora.be> wrote in message
> > news:4039e06c@forums-1-dub...
> > > Hi,
> > >
> > > I have this problem validating a powerbuilder exported XML file versus
> and
> > > XSD using the XMLParseFile function.
> > >
> > > I get the following error:
> > >
> > >     Error parsing XML document:
> > >     Datatype error: Type:InvalidDatatypeValueException, Message:Value
> > '1,00'
> > > does not match any member types (of the union) .
> > >     d:\interfaces\stockmove\out\S17.C2P, Line: 17, Position: 24.
> > >
> > > The tag in question looks as follows: <qtyVal>1,00</qtyVal>
> > >
> > > The problem seems to be that a numeric field ( which is part of a
union
> in
> > > the XSD because I need it to allow empty values, which can't be done
if
> it
> > > is defined as xs:decimal ) contains a comma (',') instead of a decimal
> > point
> > > ('.').
> > >
> > > If I change the 1,00 to 1.00 it works correctly. But since my regional
> > > settings ( and probably the regional settings of all other PC's that
are
> > > going to run this application )  have decimal point = , PB formats
> numbers
> > > with a comma instead of a decimal point.
> > >
> > > Additionally if I put 1.00 in the XML file and import it in a
> datawindow,
> > > the number in the datawindow will be 100 instead of 1.
> > >
> > > I guess I could solve this problem by either having the XSD accept a
> comma
> > > as decimal point, but I don't know how to do this, if it is at all
> > > possible....
> > >
> > > OR
> > >
> > > I could get PB to save my files in US-format (using a decimal point),
> > which
> > > would be a better solution, but it seems to always use the regional
> > settings
> > > for formatting numbers. Is there a way to have it use US-format even
on
> > PCs
> > > with european regional settings?
> > >
> > > Any input would be welcome since I've been searching for a solution
for
> a
> > > few days now....
> > >
> > > Kind regards,
> > > Roel.
> > >
> > >
> >
> >
>
>


0
Roel
2/24/2004 2:07:07 PM
Help,

this is still a problem in PB 10.5 5048...

Any idea what I can do to fix this?

This is REALLY bad. I cannot import XML Data unless I set my system locale 
to English.

Regards,

Claudius Steinhauser
Koch APL-Systems

"Roel Sergeant" <Roel.Sergeant@pandora.be> schrieb im Newsbeitrag 
news:403b5a8b$1@forums-1-dub...
> Ok thanks Roy,
>
> Will do....
>
> "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
> message news:403b57d2$1@forums-2-dub...
>> You should log this as a bug via CaseXpress.
>>
>> -- 
>> <hopethishelps/>
>> Roy Kiesler [TeamSybase]
>> SDN CodeXchange -- http://codexchange.sybase.com
>>
>> "Roel Sergeant" <Roel.Sergeant@pandora.be> wrote in message
>> news:403b2a71@forums-2-dub...
>> > Hi again,
>> >
>> > In the meantime I've found out that it seems only the . is defined by
> W3C
>> as
>> > decimal point, so I guess I can drop the solution about making the XSD
>> > accept the , as valid decimal point.
>> >
>> > That leaves me with figuring out how I can get PB to import/export
>> decimals
>> > with a . ( period )  as decimal point even when the local settings of 
>> > my
>> > machine are on , ( comma ).
>> >
>> > Any ideas are welcome....
>> >
>> > Additionally I'm wondering why PB doesn't save decimals with a . to XML
>> > instead of using the ,. It seems a comma in a decimal is just plain
> wrong
>> > XML according to the XML-Schema definition on the W3C website. But
> that's
>> > probably also something I am doing wrong.
>> >
>> > Kind regards,
>> > Roel.
>> >
>> > "Roel Sergeant" <Roel.Sergeant@pandora.be> wrote in message
>> > news:4039e06c@forums-1-dub...
>> > > Hi,
>> > >
>> > > I have this problem validating a powerbuilder exported XML file 
>> > > versus
>> and
>> > > XSD using the XMLParseFile function.
>> > >
>> > > I get the following error:
>> > >
>> > >     Error parsing XML document:
>> > >     Datatype error: Type:InvalidDatatypeValueException, Message:Value
>> > '1,00'
>> > > does not match any member types (of the union) .
>> > >     d:\interfaces\stockmove\out\S17.C2P, Line: 17, Position: 24.
>> > >
>> > > The tag in question looks as follows: <qtyVal>1,00</qtyVal>
>> > >
>> > > The problem seems to be that a numeric field ( which is part of a
> union
>> in
>> > > the XSD because I need it to allow empty values, which can't be done
> if
>> it
>> > > is defined as xs:decimal ) contains a comma (',') instead of a 
>> > > decimal
>> > point
>> > > ('.').
>> > >
>> > > If I change the 1,00 to 1.00 it works correctly. But since my 
>> > > regional
>> > > settings ( and probably the regional settings of all other PC's that
> are
>> > > going to run this application )  have decimal point = , PB formats
>> numbers
>> > > with a comma instead of a decimal point.
>> > >
>> > > Additionally if I put 1.00 in the XML file and import it in a
>> datawindow,
>> > > the number in the datawindow will be 100 instead of 1.
>> > >
>> > > I guess I could solve this problem by either having the XSD accept a
>> comma
>> > > as decimal point, but I don't know how to do this, if it is at all
>> > > possible....
>> > >
>> > > OR
>> > >
>> > > I could get PB to save my files in US-format (using a decimal point),
>> > which
>> > > would be a better solution, but it seems to always use the regional
>> > settings
>> > > for formatting numbers. Is there a way to have it use US-format even
> on
>> > PCs
>> > > with european regional settings?
>> > >
>> > > Any input would be welcome since I've been searching for a solution
> for
>> a
>> > > few days now....
>> > >
>> > > Kind regards,
>> > > Roel.
>> > >
>> > >
>> >
>> >
>>
>>
>
> 


0
frustrated
2/21/2008 3:56:53 PM
Reply:

Similar Artilces:

How to validate a decimal value with 2 digits after decimal point (de decimal point is a comma)
  I am a newbee, I have a Textbox where de user must write the price of an object. How can I validate de data entry in the Textbox (it must be a valid decimal with 2 digits after decimal point), and my pages are in  Portuguese so the decimal point to be accepted must be a comma   thanks  well you can do something like followig:  suppose TextBox1.Text = 123456,789 then you can say if(TextBox1.Text.Contains(",") ) {     int index1 = TextBox1.Text.IndexOf(",") +1;     int index2 = TextBox1.Text.IndexOf(...

Decimal point and comma in DW XML Import
Hello, this seems like a bug. Datawindow XML Import in PB 10.5 5048: Fieldtype=number Windows-Locale=German Imported decimal/double values seem to ignore the decimal point 1.82 becomes 182 If I mess with the XML file to read 1,82 it works but invalidates the XML. If I set the type to (decimal,5) it also works correctly. This is my workaround at the moment. Exporting to XML via SaveAs seems to work fine with all fieldtypes. Any idea what I can do to fix this? This is REALLY bad. I cannot import XML Data unless I set my system locale to English. Regards, Claud...

how to convert value with decimal point into value with decimal comma
Hello,  I like to know how I can change (for example) the value 55.55 into 55,55. (The system in my country is using comma's instead of points) I'm starting with  a string with the value "55.55" Then I will convert it to a double 55,55 Do I need the the system.Globalization namespace or is there just a simple solution?               Hi,If you are just going to use this format for display then it would be easy to do this:double dTemp;dTemp = 55.55;Response.Write(dTemp.ToString().Replace(".",","));H...

Decimal point / comma
Hi, We have been stuggeling for some time with a decimal point issue on our windows 2000 workstation. On a em (or dw column) we use an editmask of "#0.00" or "##.00" the em shows 0.00 or .00 during runtime. If we enter 12.15 we get 1215 if we show dec(em.text) in a messagebox. If we change the country for Dutch/Belgium to English/Us, the program works correct, but when we change it back, the problem popsup again. We use powerbuilde 8 build 9100 Andrew Peiman May be you can use String() function with format Messagebox( "Message", String(d...

Using comma as a decimal point
Hello, I have a client in Europe that uses a comma as a decimal point. So instead of typing 23.6, they would type 23,6. PB 6.5, by default, simply ignores it and accepts it as 236. Would any one know of a simple way to deal with this. Thanks. Sven Hi Sven, When do you have this problem. With editmask control or with datawindow editmask editstyle entryfields? I've tested it with editmasks, using '##,###.00" as format and I was allow to enter 12.234,56 in the editmask. My decimal point is also a comma, specified in the regional setting in the control panel. Howev...

Change decimal point to comma
Hi, Is there any easy way to change decimal points to commas in a stored procedure? I am writing data to a file using xp_cmdshell and the file needs to have commas instead of points. Thanks. Christina here is some sample code to replace decimal points with a comma declare @a varchar(20) select @a='abc.de.f' select @a while (patindex ('.,%', @a) !=0) begin select @a = stuff ( @a,patindex ('%.%', @a),1,',') end select @a <Christina_B> wrote in message news:E5881504E3DFADD8004A74E985256B84.004A751085256B84@webforums... &g...

Windows 2000 Powerbuilder Decimal Point
The datawindow is an external datawindow. It is not linked to a database. Grtz Glenn ...

Web form SaveAs XML decimal point
This is a multipart message in MIME format. --=_alternative 0029B2CEC12574C0_= Content-Type: text/plain; charset="US-ASCII" If I perform SaveAs in XML format and column is not displayed in datawindow decimal point is "," and ImportFile corrupts this number because it supposes probably ".". If column is displayed in dw it is ok (I put this column to report and erase option visible). Is there some other trick ? --=_alternative 0029B2CEC12574C0_= Content-Type: text/html; charset="US-ASCII" <br><font size=2 face="sans-serif&q...

How can I get decimal seperator ? It is comma or point
How can I get decimal seperator ? It is comma or point. How can I get which sign is used as decimal seperator by system in c#?   Thanks here is one solution to this problem that I found:http://www.devwebpro.com/devwebpro-39-20070119ASPNETChooseaStandardNumberFormat.html Don't forget to click "Mark as Answer" on the post that helped you.This marks your thread as Resolved so we will all know you have been helped. use the globalization namespace, get the current culture of the application, then get the numberformat info, then NumberDecimalSeparator ...

SaveAs() to XML. Need . as decimal point instead of ,
Datawindow.SaveAs() to XML file uses , as decimal point instead of the standard(?) . Why? And how can I get all my Decimal fields to use . as it should do? I use PB version 9. /R Hello, did you found a way to solve the problem? The only way I found was a manual replace. ls_xml = dw_text.describe ( 'DataWindow.Data.XML' ) .... and then a manual replace. But it is a dirty way, because it can happen, that you replace a wrong ','. greetings Alex Raymond schrieb: > Datawindow.SaveAs() to XML file uses , as decimal point > instead of the standar...

String.Format comma for thousands and two decimal points only
I am trying to come up with the String.Format expression to format a number that will have a comma to separate the thousands and a period for the decimals ( I want to show only two decimals ) Will this work for you? String.Format("{0:N2}", MyNumber)Thanks, EdMicrosoft MVP - ASP/ASP.NET...

PB7 / ms sql server problem with decimal point is comma
Dear all, We use PB7 and ms sql server 6.0. In our Windows 95 configuration is the decimal point a comma. For all datawindow fields of type 'float',all figures after the decimal point are cutted off. For fields of type 'real ' the reaction is correct. In the version pb6.5 everything was there no problem. Am I doing somehting wrong, or is there a workaround. Thanks for help Erwin ErWin, In Windows 95 you should set the decimal format TWICE: The Windows Settings Regional settings (Dutch: Landeninstellingen) for: 1: the local-configuration, when ...

Converting string to number but there's a comma as decimal point
I have a small problem in my XSL file when converting string to a number. This is how it’s being done: <xsl:value-of select="number(stringValue)”> Where, for example, stringValue can be "0.5" in US region or "0,5" in some European regions. While the conversion from "0.5" works great, a conversion from "0,5" results in failure and a NaN result. Does anybody know of a way of handling number conversion in XSL in a universal way that is independent from regional settings and would work for both "0.5" and "0,5"? the meaning of a decimal and comma are dependent on the...

Is it possible to use comma "," instead of point "." for decimal seperator?
Hi, Is it possible to use comma "," instead of point "." for decimal places? for example: double d = 1,2 + 1,7;   (instead of double d = 1.2 + 1.7;)  What must i do to use comma as decimal seperator? Thanks.   you can infact use the string.replace method to replace the required string you need.CheersBinowww.codepal.co.inPlease Mark as Answer if you find the post useful. you can use the string.replace method to replace the '.' for ','CheersBinowww.codepal.co.inPlease Mark as Answer if you find the post useful. infact you can...

Web resources about - Decimal point and comma - sybase.powerbuilder.xml

Decimal representation - Wikipedia, the free encyclopedia
Proof: Let , where . Then , and the result follows from dividing all sides by . (The fact that has a finite decimal representation is easily ...

Dewey Decimal Classification - Wikipedia, the free encyclopedia
This highly organized system categorizes books on library shelves in an efficient, specific and repeatable order that makes it easy to find any ...

Fraction Calculator + Decimals to Fractions Converter on the App Store on iTunes
Get Fraction Calculator + Decimals to Fractions Converter on the App Store. See screenshots and ratings, and read customer reviews.

Dewey Decimal Tattoo - Flickr - Photo Sharing!
Children's librarians represent.

Math of the Day: Sesame Street’s The Count Reads Pi to 10,000 Decimal Places
... has created a true monster out of your favorite Sesame Street vampire, with audio of The Count reading every digit of Pi out 10,000 decimal ...

UPDATED: Paul Harapin heads Decimal Software as CEO
Former VCE Asia-Pacific boss, Paul Harapin, has confirmed he is the new chief executive officer (CEO) of Decimal Software.

Feeling green: the dangers of decimal currency
The curious case of possibly toxic coins, via Austria and a devastatingly original idea for Canberra.

Jobless Rates With Another Decimal
The BLS reported a jobless rate of 8.3% for both January and February. Adding an extra decimal, the unemployment rates would actually be 8.26% ...

JPMorgan Sued by Trader Over $3 Million Decimal Point
JPMorgan Chase & Co. is being sued by a trader who says he accepted a contract from the investment bank because a typographical error made him ...

.Decimal Archive - Houston Gamer
It was only back in August when newly-formed Houston game studio Orb Interactive launched a Kickstarter campaign for “.Decimal”, a sci-fi take ...

Resources last updated: 12/29/2015 4:10:43 PM