Convert depth to and from mm.
Signed-off-by: Miika Turkia <[email protected]>
---
xslt/commonTemplates.xsl | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl
index 5c3da40..a238d11 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>
--
1.8.3.2
_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface