Solved

How to specify the number of decimal places if input is not a string

Posted on 2013-05-24
1
393 Views
Last Modified: 2013-05-24
How can I specify the number of decimal places to be displayed if the input parameter is a decimal? I tried using the XSLT format-number function, but the function expects a string.

<xsl:variable name="SQM_Cement_Production_CO2nonbio_Emission_Quantity" select="sum(/Report/Report_Detail/Sources/SQM/Cement_Production/SummationOfCO2/CO2_From_Non_Biomass_Quantity[. castable as xs:double])"/>

<xsl:value-of select="format-number($SQM_Cement_Production_CO2nonbio_Emission_Quantity, 0.0000)"/>
0
Comment
Question by:mariita
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
Comment Utility
need to put quotes around it

<xsl:value-of select="format-number($SQM_Cement_Production_CO2nonbio_Emission_Quantity, '0.0000')"/>
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now