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

RE: format-number

Subject: RE: format-number
From: "Stevenson Ngila" <Stevenson@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 May 2002 10:27:51 +0300
RE:  format-number
If what you want to get is 12.00 I don't see why you want to format it.
Just say:
<?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="test"/>
        </output>
    </xsl:template>
</xsl:stylesheet>


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of David Zuccaro
Sent: 02 May 2002 10:03
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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


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.