mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Add the pressure attribute only if it exists
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
1aced13025
commit
b919a9d700
1 changed files with 10 additions and 10 deletions
|
@ -412,14 +412,14 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:if test="$pressureField >= 0">
|
<xsl:if test="$pressureField >= 0">
|
||||||
<xsl:attribute name="pressure">
|
<xsl:variable name="pressure">
|
||||||
<xsl:variable name="pressure">
|
<xsl:call-template name="getFieldByIndex">
|
||||||
<xsl:call-template name="getFieldByIndex">
|
<xsl:with-param name="index" select="$pressureField"/>
|
||||||
<xsl:with-param name="index" select="$pressureField"/>
|
<xsl:with-param name="line" select="$line"/>
|
||||||
<xsl:with-param name="line" select="$line"/>
|
</xsl:call-template>
|
||||||
</xsl:call-template>
|
</xsl:variable>
|
||||||
</xsl:variable>
|
<xsl:if test="$pressure >= 0">
|
||||||
<xsl:if test="$pressure >= 0">
|
<xsl:attribute name="pressure">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$units = 0">
|
<xsl:when test="$units = 0">
|
||||||
<xsl:value-of select="$pressure"/>
|
<xsl:value-of select="$pressure"/>
|
||||||
|
@ -428,8 +428,8 @@
|
||||||
<xsl:value-of select="concat(format-number(($pressure div 14.5037738007), '#'), ' bar')"/>
|
<xsl:value-of select="concat(format-number(($pressure div 14.5037738007), '#'), ' bar')"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:attribute>
|
||||||
</xsl:attribute>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</sample>
|
</sample>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
Loading…
Reference in a new issue