ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: rounding numbers up or down

Subject: Re: rounding numbers up or down
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 05 Mar 2002 11:26:39 +0100
xsl rounding
XPATH has a function round(). If you have such things with 0.5, you can do something similar to <xsl:value-of select="round($Total_Pages) + 0.5)"/>. How do you want to handle numbers between 0.5 and 0.999999? Maybe you need a <xsl:choose>-statement.

Regards,

Joerg

Paul Mortimer wrote:
Hi,

Right, here's the  problem ...Im paging through my data using a stored procedure, and returning the data in xml chunks...
On the display page I've got a counter that displays how many pages there are and the users current page.. The problem I've got is that I need to round up all values of less than .5 to the nearest .5  e.g. 0.1 rounded to  0.5.

The only syntax I can find is something like ..

<xsl:value-of select="format-number($Total_Pages,'#.#')"/>

I need to be able to control which way the number is rounded up or down ..is there a function for this? .. oh im using MSXML 4.0..

Thanks

Paul Mortimer

--


System Development
VIRBUS AG
Fon  +49(0)341-979-7411
Fax  +49(0)341-979-7409
joerg.heinicke@xxxxxxxxx
www.virbus.de


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.