diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-04-08 23:08:58 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-10 09:11:00 -0700 |
commit | 07fabc03fd8f67e7fab8bb150c9b2406fc67e641 (patch) | |
tree | 93610a44b64844df3cb2e3f3dfd6eab88170fa8e /xslt/divelogs-export.xslt | |
parent | 27fa775c7ceacfce82cce3722907b4c002505ea1 (diff) | |
download | subsurface-07fabc03fd8f67e7fab8bb150c9b2406fc67e641.tar.gz |
No negative depth on divelogs.de export
Crafting depth samples produced a negative depth for the last sample.
This patch checks that negative last sample is ignored. (This occurred
when last manual sample is not full minutes.)
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, 7 insertions, 5 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt index 287b28c18..614fafd5c 100644 --- a/xslt/divelogs-export.xslt +++ b/xslt/divelogs-export.xslt @@ -214,11 +214,13 @@ </xsl:call-template> </xsl:when> <xsl:otherwise> - <SAMPLE> - <DEPTH> - <xsl:value-of select="$curdepth div 1000"/> - </DEPTH> - </SAMPLE> + <xsl:if test="$curdepth > 0"> + <SAMPLE> + <DEPTH> + <xsl:value-of select="$curdepth div 1000"/> + </DEPTH> + </SAMPLE> + </xsl:if> </xsl:otherwise> </xsl:choose> |