summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-04-09 15:31:46 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-11 17:26:45 -0700
commitf9988f0aeab12eaeb0b5217e68c9fb8f3adb9513 (patch)
treecf608388330a9570468f991d91e25dd434d6c31f /xslt
parent360cd85445e325c64246128f5b1d5a67ac462426 (diff)
downloadsubsurface-f9988f0aeab12eaeb0b5217e68c9fb8f3adb9513.tar.gz
Fix DivingLog's O2 import
Make sure the Gas setup contains O2 value when trying to import that. In latest log sample the Gas seems to contain the decompression algorithm used. And as this value was grabbed after O2, we ended up with empty O2. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/DivingLog.xslt2
1 files changed, 1 insertions, 1 deletions
diff --git a/xslt/DivingLog.xslt b/xslt/DivingLog.xslt
index f7921f619..b3a93705e 100644
--- a/xslt/DivingLog.xslt
+++ b/xslt/DivingLog.xslt
@@ -108,7 +108,7 @@
</xsl:attribute>
</xsl:if>
- <xsl:if test="Gas != ''">
+ <xsl:if test="Gas != '' and substring-after(substring-before(Gas, ')'), 'O2=') != ''">
<xsl:attribute name="o2">
<xsl:value-of select="substring-after(substring-before(Gas, ')'), 'O2=')"/>
</xsl:attribute>