When I do a transform with a stylesheet containing the function
format-number($varname,'#,##0.00') from XSLerator (which uses MSXML) I
get the result I expect, a decimal number rounded to 2 places.
When I load the stylesheet & do the transform from my VB.NET or C#
code however
(i.e. using system.xml etc) I always get NaN returned.
I don't know why, it took me ages to work it out but the fix is to
cast the first parameter in the function to number, i.e.
format-number(number($varname),'#,##0.00'), then I get what I expect.
Anyone know why I am getting this behaviour?
The first version also always used to work from my code before I
migrated to .NET.
TIA
Jim Craig.
Oleg Tkachenko - 27 Jul 2003 10:13 GMT
> When I do a transform with a stylesheet containing the function
> format-number($varname,'#,##0.00') from XSLerator (which uses MSXML) I
[quoted text clipped - 8 lines]
> format-number(number($varname),'#,##0.00'), then I get what I expect.
> Anyone know why I am getting this behaviour?
That may be realted to this bug:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&th=a770cccceffdd45f&rnum=3

Signature
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel
Eugene - 27 Jul 2006 09:02 GMT
> When I do a transform with a stylesheet containing the function
> format-number($varname,"#,##0.00") from XSLerator (which uses MSXML) I
[quoted text clipped - 15 lines]
>
> Jim Craig.
I agree
That may be realted to this bug:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&th=a770cccceffdd45f&rnum=3
Posted from http://www.topxml.com/renntp using reNNTP: the website based NNTP reader.