This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: format-number
- From: Jarkko dot Moilanen at uta dot fi
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 02 May 2002 10:37:28 +0300 (EEST)
- Subject: Re: [xsl] format-number
- References: <000701c1f1a7$58eaf470$e11e1eac@nt-internal>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Lainaus David Zuccaro <davidz@nationalpayroll.com.au>:
> Hi I'm having a problem with format number.
>
> This is my xml file:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <test>12.00</test>
>
> This is my xsl code:
> <?xml version='1.0' encoding='UTF-8' ?>
> <xsl:stylesheet version='1.0'
> xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
> <xsl:template match="test">
> <output>
> <xsl:value-of select="format-number(., '0.00')"/>
What if U write:
<xsl:value-of select="format-number(., '#.00')"/>
> </output>
> </xsl:template>
> </xsl:stylesheet>
>
> This is the output I am getting:
> <output>12</output>
>
> Shouldn't the output be:
> <output>12.00</output>
>
> I'm using xalan.
>
> Thanks in advance.
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
*******************************************************************
Jarkko Moilanen *You are wise, witty, and wonderful, *
Researcher/ ITCM *but you spend too much time *
jarkko.moilanen@uta.fi *reading this sort of trash. *
www.uta.fi/~jm60697 * *
GSM: +358 50 3766 927 * *
*******************************************************************
* ITCM Information Technology and Crisis Management *
*******************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list