Subject: Re: [xsl] NaN : How to Replace comma as decimal to avoid NaN From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Tue, 09 Sep 2008 14:46:11 +0200 |
sum ($accs/FUNum/@Granted) = 0
$divideBy = 1,750099
Result: <xsl:value-of select="sum ($accs/FUNum/@Granted) div $divideBy"/>
Expected Output: 0
Actual Output: NaN
Please note the value of divideBy contains comma(,) instead of decimal(.)
Assume we need to replace the comma as decimal. Not sure how to handle this. Since by reading the configuration file will get the value of divideBy, it has only comma instead of decimal.
How to avoid NaN.
Use translate($divideBy, ',', '.')
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] NaN : How to Replace comma as, Sathasivam, Elayaraj | Thread | Re: [xsl] NaN : How to Replace comm, David Carlisle |
[xsl] NaN : How to Replace comma as, Sathasivam, Elayaraj | Date | Re: [xsl] Searching for specific ch, David Carlisle |
Month |