Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 16th, 2014, 02:53 AM
Registered User
 
Join Date: Jul 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Question xslt- convert integer to decimal

Hi All,

I want to convert 1755 to 17.55 in xslt.

Any suggestions Please.

Thanks,
 
Old April 16th, 2014, 03:32 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Try dividing by 100 ($x div 100). Note that XSLT 1.0 only supports double-precision floating point; if you want decimal arithmetic, you need XSLT 2.0.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you convert an integer to two bytes in C#? Bill_Thompson BOOK: Professional C# 4.0 and .NET 4 1 April 15th, 2011 04:51 PM
convert decimal value as per requirement thava Beginning PHP 3 April 6th, 2009 04:29 AM
[Resolved] Convert Time to Integer snufse ASP.NET 2.0 Basics 1 October 7th, 2008 11:44 AM
convert web unit (pixels) to integer ubercat ASP.NET 1.0 and 1.1 Professional 0 August 8th, 2006 06:51 PM
convert string to integer kcheung Classic ASP Databases 1 July 28th, 2003 04:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.