summaryrefslogtreecommitdiffstats
path: root/xslt/commonTemplates.xsl
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-04-22 07:02:47 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-23 20:48:00 -0700
commit68cf4f742e42323108d89eb3daab90a41d48ae21 (patch)
treeaeda059d5c6ad7af5e98aec5890d45ccee55ea57 /xslt/commonTemplates.xsl
parent2d0473f6f534e69eaae784724bd7d4d347b15d0a (diff)
downloadsubsurface-68cf4f742e42323108d89eb3daab90a41d48ae21.tar.gz
XSLT for importing individual DM4 dives
This XSLT can be used when exporting single dives from DM4 and importing them to Subsurface. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/commonTemplates.xsl')
-rw-r--r--xslt/commonTemplates.xsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl
index 87af4d686..955cf8250 100644
--- a/xslt/commonTemplates.xsl
+++ b/xslt/commonTemplates.xsl
@@ -104,6 +104,12 @@
<xsl:value-of select="substring-before($time, ':') * 60 + substring-before(substring-after($time, ':'), ' ')"/>
</xsl:template>
+ <xsl:template name="sec2time">
+ <xsl:param name="timeSec"/>
+
+ <xsl:value-of select="concat(round($timeSec div 60), ':', format-number($timeSec mod 60, '00'))"/>
+ </xsl:template>
+
<!-- Calculate sum of all parameters, and strip any unit following the
value -->
<xsl:template name="sum">