summaryrefslogtreecommitdiffstats
path: root/xslt/csv2xml.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-05-02 20:11:37 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-05-02 10:25:10 -0700
commit304af311f0a341ccbc1da1ca85a2847f592be4d9 (patch)
tree66bd9fa1b2d6c31a247ee964553273eab8fddea6 /xslt/csv2xml.xslt
parent7ec83ef02a7216bd2de19798d250df8540b90b38 (diff)
downloadsubsurface-304af311f0a341ccbc1da1ca85a2847f592be4d9.tar.gz
CSV import: import dive number if defined
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.xslt9
1 files changed, 9 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index b196ae054..3d998850c 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -101,6 +101,15 @@
</xsl:choose>
</xsl:attribute>
+ <xsl:if test="$numberField >= 0">
+ <xsl:attribute name="number">
+ <xsl:call-template name="getFieldByIndex">
+ <xsl:with-param name="index" select="$numberField"/>
+ <xsl:with-param name="line" select="substring-after(substring-after(., $lf), $lf)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+
<!-- 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">