This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: format-number
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 2 May 2002 11:03:50 +0100
- Subject: RE: [xsl] format-number
- Reply-to: xsl-list at lists dot mulberrytech dot com
Saxon gives
<?xml version="1.0" encoding="utf-8"?><output>12.00</output>
which I think is correct.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of
> David Zuccaro
> Sent: 02 May 2002 08:03
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] format-number
>
>
> 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')"/>
> </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
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list