summaryrefslogtreecommitdiffstats
path: root/xslt/xml2manualcsv.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2020-05-18 17:32:41 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-26 11:33:10 -0700
commit19cdab52b395fae73ce5cf42bf938eb75041ed62 (patch)
tree824c5f9f9cf0e79e027ff9b2eae033dcbb048ea3 /xslt/xml2manualcsv.xslt
parent9deb4f4a22f69c1434b8d175868cf3b9446bf808 (diff)
downloadsubsurface-19cdab52b395fae73ce5cf42bf938eb75041ed62.tar.gz
CSV export: Split printing of header
This will split the printing of header for CSV export. Cylinder information is printed by itself allowing me to later print it in a loop as many times as there are cylinders. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt/xml2manualcsv.xslt')
-rw-r--r--xslt/xml2manualcsv.xslt28
1 files changed, 22 insertions, 6 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index d690cec41..3892d8c6e 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -13,6 +13,8 @@
<xsl:template match="/divelog/dives">
<xsl:choose>
<xsl:when test="$units = 1">
+
+ <!-- Print beginning of the header -->
<xsl:value-of select="concat(
'&quot;dive number&quot;',
$fs,
@@ -33,7 +35,10 @@
'&quot;airtemp (F)&quot;',
$fs,
'&quot;watertemp (F)&quot;',
- $fs,
+ $fs)"/>
+
+ <!-- Print cylinder info according to the amount of cylinders in dive -->
+ <xsl:value-of select="concat(
'&quot;cylinder size (cuft)&quot;',
$fs,
'&quot;startpressure (psi)&quot;',
@@ -43,7 +48,10 @@
'&quot;o2 (%)&quot;',
$fs,
'&quot;he (%)&quot;',
- $fs,
+ $fs)"/>
+
+ <!-- Print rest of the header -->
+ <xsl:value-of select="concat(
'&quot;location&quot;',
$fs,
'&quot;gps&quot;',
@@ -65,8 +73,10 @@
'&quot;tags&quot;')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="
- concat('&quot;dive number&quot;',
+
+ <!-- Print beginning of the header -->
+ <xsl:value-of select="concat(
+ '&quot;dive number&quot;',
$fs,
'&quot;date&quot;',
$fs,
@@ -85,7 +95,10 @@
'&quot;airtemp (C)&quot;',
$fs,
'&quot;watertemp (C)&quot;',
- $fs,
+ $fs)"/>
+
+ <!-- Print cylinder info according to the amount of cylinders in dive -->
+ <xsl:value-of select="concat(
'&quot;cylinder size (l)&quot;',
$fs,
'&quot;startpressure (bar)&quot;',
@@ -95,7 +108,10 @@
'&quot;o2 (%)&quot;',
$fs,
'&quot;he (%)&quot;',
- $fs,
+ $fs)"/>
+
+ <!-- Print rest of the header -->
+ <xsl:value-of select="concat(
'&quot;location&quot;',
$fs,
'&quot;gps&quot;',