summaryrefslogtreecommitdiffstats
path: root/xslt/csv2xml.xslt
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-06-27 23:38:13 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-27 14:43:28 -0700
commitfeb15a5498c640651bf48781d828d8fed79a2412 (patch)
tree1b405502e994d41fb946e5a2fb545c7f25419d2d /xslt/csv2xml.xslt
parentd3d5f88384e35ac2865df32c04c682a2b64e7e8b (diff)
downloadsubsurface-feb15a5498c640651bf48781d828d8fed79a2412.tar.gz
Set the number of o2 sensors on a CSV import
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/csv2xml.xslt')
-rw-r--r--xslt/csv2xml.xslt3
1 files changed, 3 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index e13d0a984..92542c246 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -45,6 +45,9 @@
<divecomputer model="Imported from CSV" deviceid="ffffffff">
<xsl:if test="$po2Field >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
<xsl:attribute name="dctype">CCR</xsl:attribute>
+ <xsl:attribute name="no_o2sensors">
+ <xsl:copy-of select="number($o2sensor1Field >= 0) + number($o2sensor2Field >= 0) + number($o2sensor3Field >= 0)" />
+ </xsl:attribute>
</xsl:if>
<xsl:call-template name="printLine">
<xsl:with-param name="line" select="substring-before(//csv, $lf)"/>