RE: [xsl] Format-Number Function

Subject: RE: [xsl] Format-Number Function
From: fchoodless@xxxxxxxxxxx
Date: Mon, 14 Mar 2005 23:11:57 +0000
Michael,

Thanks for the response.  I'm using Livelink and I wouldn't be surprised if it's a bug but if there is it's going to really screw me up.  Here's the xsl line:

<td class="number"><xsl:value-of select="format-number(./Total_Cost, '#,###,###')"/></td>

The xml is basically like this:
<Florida2004A>
<Total_Cost>3603664</Total_Cost>
</Florida2004A>

It comes back to me as '3.' There is no xsl:decimal-format specification in my code.  Again, this does format correctly for any number with 6 digits or less.  Any suggested work around or other ideas? (other than a new processor?)  I guess I could use string functions to format correctly.

Many thanks,
Carter


> Which XSLT processor are you using? Unless there's something in your code
> you haven't told us about (like an unusual xsl:decimal-format specification)
> there's a bug in your processor.
> 
> Michael Kay
> http://www.saxonica.com/ 
> 
> > -----Original Message-----
> > From: fchoodless@xxxxxxxxxxx [mailto:fchoodless@xxxxxxxxxxx] 
> > Sent: 14 March 2005 19:15
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: [xsl] Format-Number Function
> > 
> > I'm experiencing an xsl number-format function problem.  The 
> > number I want to format is '3603664',  I use '#,###,###' and 
> > it comes back as '3.'
> > 
> > Any ideas as to what I'm doing wrong?  Any thing less than 6 
> > digits works OK, it seems to break once it gets to millions.  
> > Any suggestions would be greatly appreciated.
> > 
> > Thanks,
> > 
> > Carter

Current Thread