summaryrefslogtreecommitdiffstats
path: root/xslt/commonTemplates.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'xslt/commonTemplates.xsl')
-rw-r--r--xslt/commonTemplates.xsl12
1 files changed, 12 insertions, 0 deletions
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl
index 5c3da408b..a238d1117 100644
--- a/xslt/commonTemplates.xsl
+++ b/xslt/commonTemplates.xsl
@@ -153,4 +153,16 @@
</xsl:choose>
</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>