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>
This commit is contained in:
Anton Lundin 2015-06-27 23:38:13 +02:00 committed by Dirk Hohndel
parent d3d5f88384
commit feb15a5498

View file

@ -45,6 +45,9 @@
<divecomputer model="Imported from CSV" deviceid="ffffffff"> <divecomputer model="Imported from CSV" deviceid="ffffffff">
<xsl:if test="$po2Field >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0"> <xsl:if test="$po2Field >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
<xsl:attribute name="dctype">CCR</xsl:attribute> <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:if>
<xsl:call-template name="printLine"> <xsl:call-template name="printLine">
<xsl:with-param name="line" select="substring-before(//csv, $lf)"/> <xsl:with-param name="line" select="substring-before(//csv, $lf)"/>