Solved

How to remove or strip a decimal point and figure after decimal point in xsl template?

Posted on 2009-07-12
3
1,546 Views
Last Modified: 2013-11-18
I need to know how I can remove or strip a decimal point and figure after decimal point in xsl template?

See xsl value below:

<xsl:value-of select="qty/order">

and the output example is

"1.000"

I need to just get "1"
0
Comment
Question by:DavidO84
  • 2
3 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 24837555
<xsl:value-of select="substring-before(qty/order, '.')">
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 24837576
nicer is to treat is as a number
<xsl:value-of select="floor(qty/order)">
the difference is in the negative numbers
if the number would be "-7.9"
first solution will return "-7"
second solution will returen "-8"
0
 

Author Closing Comment

by:DavidO84
ID: 31602690
Worked perfectly and very easy to understand thanks.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to write an English digest paper 6 101
Grunt Copy file to another destination. 1 80
XML Removal- Powershell 4 33
Problem to copy file 14 49
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

756 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