Solved

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

Posted on 2013-05-24
1
398 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 39194191
need to put quotes around it

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
XML Paring  Error - Premature end of file. 7 198
How do I bind the results to a grid 3 47
XSLT XML 4 33
tutorial for ebay api 3 81
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 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