summaryrefslogtreecommitdiffstats
path: root/xslt/csv2xml.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-07-27 16:13:27 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-27 06:33:57 -0700
commit615f45e58b13f0c025155e53834e1491e0112aac (patch)
tree55f34712d8bef86fd25fce63b16f264b09f78b7e /xslt/csv2xml.xslt
parent87c35e19e261fbd6f15c3796e0bae87d177be4f3 (diff)
downloadsubsurface-615f45e58b13f0c025155e53834e1491e0112aac.tar.gz
CSV import: create o2 and diluent cylinders for CCR
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/csv2xml.xslt')
-rw-r--r--xslt/csv2xml.xslt8
1 files changed, 8 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index c957421f9..f2d652ec2 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -43,6 +43,14 @@
<xsl:attribute name="time">
<xsl:value-of select="concat(substring($time, 2, 2), ':', substring($time, 4, 2))"/>
</xsl:attribute>
+
+ <!-- If the dive is CCR, create oxygen and diluent cylinders -->
+
+ <xsl:if test="$po2Field >= 0 or $setpointField >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
+ <cylinder description='oxygen' o2="100.0%" use='oxygen' />
+ <cylinder description='diluent' o2="21.0%" use='diluent' />
+ </xsl:if>
+
<divecomputer model="Imported from CSV" deviceid="ffffffff">
<xsl:if test="$po2Field >= 0 or $setpointField >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
<xsl:attribute name="dctype">CCR</xsl:attribute>