Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-07-12
3
Medium Priority
?
1,765 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
[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
  • 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

670 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