summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-12-10 08:40:39 +0200
committerGravatar mturkia <miika.turkia@gmail.com>2017-12-10 11:29:52 +0200
commit2e340d3a61243c0bd42a6ba1639b66bbb340cee6 (patch)
tree2a9d48839a60b5c6b44c2ced6c4bd14e8f4a2043 /xslt
parent2b484316e47a30512e4692136ae013ab479db89a (diff)
downloadsubsurface-2e340d3a61243c0bd42a6ba1639b66bbb340cee6.tar.gz
Include cylinder pressures on export when they exist
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/uddf-export.xslt8
1 files changed, 4 insertions, 4 deletions
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
index d89a5b071..8037d7d0e 100644
--- a/xslt/uddf-export.xslt
+++ b/xslt/uddf-export.xslt
@@ -360,11 +360,11 @@
<xsl:value-of select="substring-before(@start, ' ') * 100000"/>
</tankpressurebegin>
</xsl:when>
- <xsl:otherwise>
+ <xsl:when test="../divecomputer[1]/sample[@pressure]/@pressure[1]">
<tankpressurebegin>
<xsl:value-of select="substring-before(../divecomputer[1]/sample[@pressure]/@pressure[1], ' ') * 100000"/>
</tankpressurebegin>
- </xsl:otherwise>
+ </xsl:when>
</xsl:choose>
<xsl:choose>
@@ -373,11 +373,11 @@
<xsl:value-of select="substring-before(@end, ' ') * 100000"/>
</tankpressureend>
</xsl:when>
- <xsl:otherwise>
+ <xsl:when test="../divecomputer[1]/sample[@pressure][last()]/@pressure[1]">
<tankpressureend>
<xsl:value-of select="substring-before(../divecomputer[1]/sample[@pressure][last()]/@pressure[1], ' ') * 100000"/>
</tankpressureend>
- </xsl:otherwise>
+ </xsl:when>
</xsl:choose>
</tankdata>