Here are two simple XSLT functions for converting between miles and km
<xsl:function name="fn:miles-to-km">
<xsl:param name="miles" as="xs:decimal"/>
<xsl:sequence select="format-number($miles * 1.609347, '0.0')"/>
</xsl:function>
<xsl:function name="fn:km-to-miles">
<xsl:param name="km" as="xs:decimal"/>
<xsl:sequence select="format-number($km * 0.621371, '0.0')"/>
</xsl:function>
No comments:
Post a Comment