[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Format-Number Function

Subject: RE: Format-Number Function
From: "Ross, Douglas" <DRoss@xxxxxxxxxx>
Date: Tue, 15 Mar 2005 05:47:58 -0500
format number function
What happens if you add extra #s to the format, like '###,###,###', as a
possible workaround? Is that a valid format?

Douglas Ross
Developer, HTML UI Framework
Kronos
www.kronos.com

-----Original Message-----
From: fchoodless@xxxxxxxxxxx [mailto:fchoodless@xxxxxxxxxxx]
Sent: Monday, March 14, 2005 6:12 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Format-Number Function

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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.