summaryrefslogtreecommitdiffstats
path: root/xslt/xml2csv.xslt
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2018-03-11 21:34:47 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-03-19 11:59:58 -0700
commitfc01045680230e3d8a85b74520b268eea42a67b1 (patch)
tree3b7a526dd6f68083c8774a6994a5d11182edd4b1 /xslt/xml2csv.xslt
parent8180e494270e3b09f7c52790251a860bb1da66e4 (diff)
downloadsubsurface-fc01045680230e3d8a85b74520b268eea42a67b1.tar.gz
CSV export: Modify format of dive list and dive profile export
In dive list CSV export: - Move unit "min" from duration field to header - Move unit "%" from O2 and He fields to header In dive profile CSV export: - Add "min" to sample time header - Add column for sample heart rate Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'xslt/xml2csv.xslt')
-rw-r--r--xslt/xml2csv.xslt9
1 files changed, 7 insertions, 2 deletions
diff --git a/xslt/xml2csv.xslt b/xslt/xml2csv.xslt
index 25f5d8b7c..e4a40cc74 100644
--- a/xslt/xml2csv.xslt
+++ b/xslt/xml2csv.xslt
@@ -9,10 +9,10 @@
<xsl:template match="/divelog/dives">
<xsl:choose>
<xsl:when test="$units = 1">
- <xsl:value-of select="concat('&quot;dive number&quot;', $fs, '&quot;date&quot;', $fs, '&quot;time&quot;', $fs, '&quot;sample time&quot;', $fs, '&quot;sample depth (ft)&quot;', $fs, '&quot;sample temperature (F)&quot;', $fs, '&quot;sample pressure (psi)&quot;')"/>
+ <xsl:value-of select="concat('&quot;dive number&quot;', $fs, '&quot;date&quot;', $fs, '&quot;time&quot;', $fs, '&quot;sample time (min)&quot;', $fs, '&quot;sample depth (ft)&quot;', $fs, '&quot;sample temperature (F)&quot;', $fs, '&quot;sample pressure (psi)&quot;', $fs, '&quot;sample heartrate&quot;')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="concat('&quot;dive number&quot;', $fs, '&quot;date&quot;', $fs, '&quot;time&quot;', $fs, '&quot;sample time&quot;', $fs, '&quot;sample depth (m)&quot;', $fs, '&quot;sample temperature (C)&quot;', $fs, '&quot;sample pressure (bar)&quot;')"/>
+ <xsl:value-of select="concat('&quot;dive number&quot;', $fs, '&quot;date&quot;', $fs, '&quot;time&quot;', $fs, '&quot;sample time (min)&quot;', $fs, '&quot;sample depth (m)&quot;', $fs, '&quot;sample temperature (C)&quot;', $fs, '&quot;sample pressure (bar)&quot;', $fs, '&quot;sample heartrate&quot;')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
@@ -72,6 +72,11 @@
</xsl:choose>
</xsl:if>
+ <xsl:value-of select="$fs"/>
+ <xsl:if test="@heartbeat != ''">
+ <xsl:value-of select="concat('&quot;', @heartbeat, '&quot;')"/>
+ </xsl:if>
+
<xsl:text>
</xsl:text>
</xsl:for-each>