[PATCH 3/3] Fix end pressure on DLD export
Miika Turkia
miika.turkia at gmail.com
Tue Mar 26 01:25:51 PDT 2013
While working on UDDF export I noticed that the grabbing of last
sample pressure was not working properly. This will fix it for DLD
export.
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
xslt/divelogs-export.xslt | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt
index 00f6037..d09f503 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!='']) > 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"/>
--
1.7.9.5
More information about the subsurface
mailing list