diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-12-13 15:12:37 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-13 08:50:53 -0800 |
commit | aa76bbaa97593f59c5f262acd43e5f1fe291d4a9 (patch) | |
tree | 6b84a3c115af0f6c66f1b328fbd6c2462a81a159 /xslt/divelogs-export.xslt | |
parent | 3c9c1ec06f9f17c49cf9ca5031e08bf506916ec0 (diff) | |
download | subsurface-aa76bbaa97593f59c5f262acd43e5f1fe291d4a9.tar.gz |
Export only used cylinders to divelogs.de
This attempts to export only used cylinders to divelogs.de. The
detection is based only on o2 percentage as per our test dives. However,
the new cylinder id would be better, but that does not exist on old
dives.
Fixes #757
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/divelogs-export.xslt')
-rw-r--r-- | xslt/divelogs-export.xslt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt index b3b8dfa5e..79f72b5fd 100644 --- a/xslt/divelogs-export.xslt +++ b/xslt/divelogs-export.xslt @@ -109,6 +109,17 @@ <ADDITIONALTANKS> <xsl:for-each select="cylinder[position() != $cylinder]"> + <xsl:variable name="gas"> + <xsl:choose> + <xsl:when test="@o2 != ''"> + <xsl:value-of select="substring-before(@o2, '.')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'21'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:if test="following-sibling::divecomputer/event[@name='gaschange' and @value=$gas]"> <xsl:variable name="cur_cyl"> <xsl:value-of select="position()"/> </xsl:variable> @@ -147,6 +158,7 @@ <xsl:value-of select="substring-before(@he, '%')"/> </HEPCT> </TANK> + </xsl:if> </xsl:for-each> </ADDITIONALTANKS> |