summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xslt/divelogs-export.xslt5
1 files changed, 1 insertions, 4 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt
index 00f603716..d09f503ab 100644
--- a/xslt/divelogs-export.xslt
+++ b/xslt/divelogs-export.xslt
@@ -57,10 +57,7 @@
<CYLINDERENDPRESSURE>
<xsl:choose>
<xsl:when test="count(node()/sample[@pressure!='']) &gt; 0">
- <xsl:variable name="samples">
- <xsl:value-of select="count(node()/sample[@pressure!=''])"/>
- </xsl:variable>
- <xsl:value-of select="node()/sample[position() = $samples]/@pressure"/>
+ <xsl:value-of select="node()/sample[@pressure][last()]/@pressure"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="cylinder[1]/@end"/>