[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Q - Value of param doesn't change !
So, what's your problem? If I run your posted files I get $ saxon j.xml j.xsl <table xmlns:xs="http://www.w3.org/2001/XMLSchema" width="98%" border="0" cellP dding="0" cellSpacing="1" bgcolor="#CCCCCC" class="searchResult"> <tbody> <tr> <td>7 hrs -20 mins</td> </tr> <tr> <td>7 hrs -20 mins</td> </tr> </tbody> </table> But both of your input times were the same, if I change one of them from <JrnyTm>400</JrnyTm> to <JrnyTm>500</JrnyTm> I get <table xmlns:xs="http://www.w3.org/2001/XMLSchema" width="98%" border="0" cellPa dding="0" cellSpacing="1" bgcolor="#CCCCCC" class="searchResult"> <tbody> <tr> <td>7 hrs -20 mins</td> </tr> <tr> <td>8 hrs 20 mins</td> </tr> </tbody> </table> showing the time is recalculated.. Your actual calculation is probably not what you want (you probably always want the minuutes to be positive) but your example doesn't show the problem that you stated in your original post. You don't want to use format-number to get a string and then number() to convert it back to a number, you probably just want something like <xsl:with-param name="hrs" select="floor(JrnyTm div 60)"/> <xsl:with-param name="mins" select="JrnyTm - floor(JrnyTm div 60) * 60"/> which gives <tr> <td>6 hrs 40 mins</td> </tr> <tr> <td>8 hrs 20 mins</td> </tr> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|