Add depth conversions to XSLT

Convert depth to and from mm.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2013-12-28 09:05:32 +02:00 committed by Dirk Hohndel
parent abcc4d55bd
commit a88f413f70

View file

@ -153,4 +153,16 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<xsl:template name="depth2mm">
<xsl:param name="depth"/>
<xsl:value-of select="format-number(substring-before($depth, ' '), '#.##') * 1000"/>
</xsl:template>
<xsl:template name="mm2depth">
<xsl:param name="depth"/>
<xsl:value-of select="concat(floor($depth div 1000), '.', format-number($depth mod 1000, '00'))"/>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>