Subject: RE: [xsl] Calculate mantissa and exponent? From: "Tim Watts" <timw@xxxxxxx> Date: Fri, 10 Aug 2001 07:40:48 +1000 |
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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Calculate mantissa and expone, Mitchell, Edmund | Thread | RE: [xsl] Calculate mantissa and ex, Mitchell, Edmund |
Re: [xsl] xalan-j2 D7: StreamSource, Myriam_Midy | Date | [xsl] Currency Localization, Tim Watts |
Month |