Is there a more elegant solution to the following in xslt 1.0? I understand there are built in functions to xslt 2.0.
I'm taking a number in decimal hours and need to represent it as HH:MM:SS. At the moment I have the following which functions well.
<xsl:variable name="decimal_hours" select="pre_lab_cost div pre_labour_rate"/> <xsl:variable name="decimal_minutes" select="number(concat('0.',substring-after($decimal_hours, '.')))*60"/> <xsl:variable name="decimal_seconds" select="number(concat('0.',substring-after($decimal_minutes, '.')))*60"/> <xsl:value-of select="concat(format-number(floor($decimal_hours), '00'), ':', format-number(floor($decimal_minutes), '00'), ':', format-number(floor($decimal_seconds), '00') )"/>