summaryrefslogtreecommitdiffstats
path: root/xslt/xml2manualcsv.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/xml2manualcsv.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/xml2manualcsv.xslt')
-rw-r--r--xslt/xml2manualcsv.xslt14
1 files changed, 7 insertions, 7 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index 242332756..a2f941da0 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -13,10 +13,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;duration&quot;', $fs, '&quot;maxdepth (ft)&quot;', $fs, '&quot;avgdepth (ft)&quot;', $fs, '&quot;airtemp (F)&quot;', $fs, '&quot;watertemp (F)&quot;', $fs, '&quot;cylinder size (cuft)&quot;', $fs, '&quot;startpressure (psi)&quot;', $fs, '&quot;endpressure (psi)&quot;', $fs, '&quot;o2&quot;', $fs, '&quot;he&quot;', $fs, '&quot;location&quot;', $fs, '&quot;gps&quot;', $fs, '&quot;divemaster&quot;', $fs, '&quot;buddy&quot;', $fs, '&quot;suit&quot;', $fs, '&quot;rating&quot;', $fs, '&quot;visibility&quot;', $fs, '&quot;notes&quot;', $fs, '&quot;weight (lbs)&quot;', $fs, '&quot;tags&quot;')"/>
+ <xsl:value-of select="concat('&quot;dive number&quot;', $fs, '&quot;date&quot;', $fs, '&quot;time&quot;', $fs, '&quot;duration (min)&quot;', $fs, '&quot;maxdepth (ft)&quot;', $fs, '&quot;avgdepth (ft)&quot;', $fs, '&quot;airtemp (F)&quot;', $fs, '&quot;watertemp (F)&quot;', $fs, '&quot;cylinder size (cuft)&quot;', $fs, '&quot;startpressure (psi)&quot;', $fs, '&quot;endpressure (psi)&quot;', $fs, '&quot;o2 (%)&quot;', $fs, '&quot;he (%)&quot;', $fs, '&quot;location&quot;', $fs, '&quot;gps&quot;', $fs, '&quot;divemaster&quot;', $fs, '&quot;buddy&quot;', $fs, '&quot;suit&quot;', $fs, '&quot;rating&quot;', $fs, '&quot;visibility&quot;', $fs, '&quot;notes&quot;', $fs, '&quot;weight (lbs)&quot;', $fs, '&quot;tags&quot;')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="concat('&quot;dive number&quot;', $fs, '&quot;date&quot;', $fs, '&quot;time&quot;', $fs, '&quot;duration&quot;', $fs, '&quot;maxdepth (m)&quot;', $fs, '&quot;avgdepth (m)&quot;', $fs, '&quot;airtemp (C)&quot;', $fs, '&quot;watertemp (C)&quot;', $fs, '&quot;cylinder size (l)&quot;', $fs, '&quot;startpressure (bar)&quot;', $fs, '&quot;endpressure (bar)&quot;', $fs, '&quot;o2&quot;', $fs, '&quot;he&quot;', $fs, '&quot;location&quot;', $fs, '&quot;gps&quot;', $fs, '&quot;divemaster&quot;', $fs, '&quot;buddy&quot;', $fs, '&quot;suit&quot;', $fs, '&quot;rating&quot;', $fs, '&quot;visibility&quot;', $fs, '&quot;notes&quot;', $fs, '&quot;weight (kg)&quot;', $fs, '&quot;tags&quot;')"/>
+ <xsl:value-of select="concat('&quot;dive number&quot;', $fs, '&quot;date&quot;', $fs, '&quot;time&quot;', $fs, '&quot;duration (min)&quot;', $fs, '&quot;maxdepth (m)&quot;', $fs, '&quot;avgdepth (m)&quot;', $fs, '&quot;airtemp (C)&quot;', $fs, '&quot;watertemp (C)&quot;', $fs, '&quot;cylinder size (l)&quot;', $fs, '&quot;startpressure (bar)&quot;', $fs, '&quot;endpressure (bar)&quot;', $fs, '&quot;o2 (%)&quot;', $fs, '&quot;he (%)&quot;', $fs, '&quot;location&quot;', $fs, '&quot;gps&quot;', $fs, '&quot;divemaster&quot;', $fs, '&quot;buddy&quot;', $fs, '&quot;suit&quot;', $fs, '&quot;rating&quot;', $fs, '&quot;visibility&quot;', $fs, '&quot;notes&quot;', $fs, '&quot;weight (kg)&quot;', $fs, '&quot;tags&quot;')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
@@ -40,7 +40,7 @@
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="$fs"/>
<xsl:text>&quot;</xsl:text>
- <xsl:value-of select="@duration"/>
+ <xsl:value-of select="substring-before(@duration, ' ')"/>
<xsl:text>&quot;</xsl:text>
<xsl:choose>
<xsl:when test="divecomputer[1]/depth/@mean|divecomputer[1]/depth/@max != ''">
@@ -123,11 +123,11 @@
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="$fs"/>
<xsl:text>&quot;</xsl:text>
- <xsl:value-of select="cylinder[1]/@o2"/>
+ <xsl:value-of select="substring-before(cylinder[1]/@o2, '%')"/>
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="$fs"/>
<xsl:text>&quot;</xsl:text>
- <xsl:value-of select="cylinder[1]/@he"/>
+ <xsl:value-of select="substring-before(cylinder[1]/@he, '%')"/>
<xsl:text>&quot;</xsl:text>
</xsl:otherwise>
</xsl:choose>
@@ -310,11 +310,11 @@
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="$fs"/>
<xsl:text>&quot;</xsl:text>
- <xsl:value-of select="@o2"/>
+ <xsl:value-of select="substring-before(@o2, '%')"/>
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="$fs"/>
<xsl:text>&quot;</xsl:text>
- <xsl:value-of select="@he"/>
+ <xsl:value-of select="substring-before(@he, '%')"/>
<xsl:text>&quot;</xsl:text>
</xsl:template>
<xsl:template match="location">