[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Calculate mantissa and exponent?
Edward, Have you looked into using the format-number function? you could do something like ... <xsl:value-of select="format-number(12345, '##0.####E0') /> for an output of 1.2345E4 More info in contained in MK's book (XSLT Programmer's Reference) pp455-459 (First Edition) It would also be useful to look into xsl:decimal-format to find more about the display of numbers, Regards, Tim Watts > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Mitchell, > Edmund > Sent: Thursday, 9 August 2001 10:19 PM > To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' > Subject: Calculate mantissa and exponent? > > > Hello all, > I have to calculate a numbers' mantissa and exponent. > So if I have 123456, it should be normalized as 1,23456e+5. > Unfortunately, I have to use only pure xsl, no extension functions or > scripts are allowed. > XSLTSL & EXSLT don't seem to have this functionality. > > To avoid re-inventing the wheel, has anyone solved this before? > > Thanks, > > Edmund > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|