aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2020-05-16 12:17:01 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-18 09:32:58 -0700
commit0525f31510dd140aab494767e097a2eb4a015b7a (patch)
tree545d3dec5d338425bad5c196ead28edc63639c99 /xslt
parent3e2a410f93c2b58062a64d3e16f304552a303a7f (diff)
downloadsubsurface-0525f31510dd140aab494767e097a2eb4a015b7a.tar.gz
CSV export: include SAC when exporting dive details
Simply adds SAC field to CSV export of dive details. Fixes #2829 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/xml2manualcsv.xslt15
1 files changed, 15 insertions, 0 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index 8ebe1daa5..d690cec41 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -22,6 +22,8 @@
$fs,
'&quot;duration (min)&quot;',
$fs,
+ '&quot;sac (cuft/min)&quot;',
+ $fs,
'&quot;maxdepth (ft)&quot;',
$fs,
'&quot;avgdepth (ft)&quot;',
@@ -72,6 +74,8 @@
$fs,
'&quot;duration (min)&quot;',
$fs,
+ '&quot;sac (l/min)&quot;',
+ $fs,
'&quot;maxdepth (m)&quot;',
$fs,
'&quot;avgdepth (m)&quot;',
@@ -136,6 +140,17 @@
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="substring-before(@duration, ' ')"/>
<xsl:text>&quot;</xsl:text>
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$units = 1">
+ <xsl:value-of select="format-number(substring-before(@sac, ' ') * 0.035315, '#.##')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-before(@sac, ' ')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>&quot;</xsl:text>
<xsl:choose>
<xsl:when test="divecomputer[1]/depth/@mean|divecomputer[1]/depth/@max != ''">
<xsl:apply-templates select="divecomputer[1]/depth"/>