Fix end pressure on DLD export

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@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2013-03-26 10:25:51 +02:00 committed by Dirk Hohndel
parent ac5881c3fe
commit 5533cd749f

View file

@ -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"/>