mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Correct ending pressure for .DLD export
We grab the pressure information from samples, if available. Otherwise, we use information from first cylinder. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d6e77cd168
commit
98d769a02f
1 changed files with 19 additions and 5 deletions
|
@ -45,13 +45,27 @@
|
|||
<xsl:value-of select="substring-before(cylinder/@size, ' ')"/>
|
||||
</CYLINDERSIZE>
|
||||
<CYLINDERSTARTPRESSURE>
|
||||
<xsl:value-of select="substring-before(node()/sample/@pressure, ' ')"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="node()/sample/@pressure != ''">
|
||||
<xsl:value-of select="substring-before(node()/sample/@pressure, ' ')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="cylinder[1]/@start"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</CYLINDERSTARTPRESSURE>
|
||||
<CYLINDERENDPRESSURE>
|
||||
<xsl:variable name="samples">
|
||||
<xsl:value-of select="count(node()/sample)"/>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="node()/sample[position() = $samples]/@pressure"/>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="cylinder[1]/@end"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</CYLINDERENDPRESSURE>
|
||||
<WEIGHT>
|
||||
<xsl:call-template name="sum">
|
||||
|
|
Loading…
Reference in a new issue