summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-12-10 08:32:17 +0200
committerGravatar mturkia <miika.turkia@gmail.com>2017-12-10 11:29:52 +0200
commit2b484316e47a30512e4692136ae013ab479db89a (patch)
treef7a2a52dfdf1dc65246b4ecda2fa974dcd486ac3 /xslt
parent38cc8bdc40af408afb7904710d4db90eff20376e (diff)
downloadsubsurface-2b484316e47a30512e4692136ae013ab479db89a.tar.gz
Check that cylinder start and end pressures exist
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/uddf.xslt16
1 files changed, 10 insertions, 6 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index 912b0f4d3..a052eeba3 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -285,12 +285,16 @@
<xsl:attribute name="he">
<xsl:value-of select="//gas_mix[@id=$gas]/he"/>
</xsl:attribute>
- <xsl:attribute name="start">
- <xsl:value-of select="concat(substring-before(./pressure_start, '.') div 100000, ' bar')"/>
- </xsl:attribute>
- <xsl:attribute name="end">
- <xsl:value-of select="concat(substring-before(./pressure_end, '.') div 100000, ' bar')"/>
- </xsl:attribute>
+ <xsl:if test="./pressure_start != ''">
+ <xsl:attribute name="start">
+ <xsl:value-of select="concat(substring-before(./pressure_start, '.') div 100000, ' bar')"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="./pressure_end != ''">
+ <xsl:attribute name="end">
+ <xsl:value-of select="concat(substring-before(./pressure_end, '.') div 100000, ' bar')"/>
+ </xsl:attribute>
+ </xsl:if>
</cylinder>
</xsl:for-each>
</xsl:if>