Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Division in XSLT

Tags:

xslt

I'm trying to take a value that I'm pulling from a database and divide it by 12 and display that number, but I can't seem to get it right. This is what I have so far to display a value:

$<xsl:value-of select="format-number(number(//Applications/AveAnnualVolume),'###,###,##0.00')"/>  

That part works, but I can't figure out how to divide it by 12 and display that instead.

like image 421
Kerny Avatar asked Jan 21 '13 21:01

Kerny


1 Answers

XPath uses div for division since slashes are used as separators.

$<xsl:value-of select="format-number(//Applications/AveAnnualVolume div 12,'###,###,##0.00')"/>  
like image 161
John Kugelman Avatar answered Oct 04 '22 05:10

John Kugelman