diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-07-16 16:53:25 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-16 09:22:33 -0700 |
commit | cd4dc503fc753dd1c42622e6cae03e205c48ed42 (patch) | |
tree | 38b320b2aa97c290b4d013f793173a2f5641f4d5 /xslt/uddf.xslt | |
parent | 004b9d72c576cffed5ceaaf1d563cc4cfa3b3a04 (diff) | |
download | subsurface-cd4dc503fc753dd1c42622e6cae03e205c48ed42.tar.gz |
Set proper gas type on UDDF import
Use type 25 on UDDF import when the gas mix contains some helium.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/uddf.xslt')
-rw-r--r-- | xslt/uddf.xslt | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt index 618c08059..d8ea618e6 100644 --- a/xslt/uddf.xslt +++ b/xslt/uddf.xslt @@ -301,7 +301,18 @@ <xsl:value-of select="../../equipment_used/tank_used[@id=$tank_idx]/gas_ref/@ref"/> </xsl:variable> - <event name="gaschange" type="11"> + <xsl:variable name="type"> + <xsl:choose> + <xsl:when test="translate(//gas_def/gas_mix[@id=$idx]/o2, ',', '.') > 0"> + <xsl:value-of select="25"/> <!-- SAMPLE_EVENT_GASCHANGE2 --> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="11"/> <!-- SAMPLE_EVENT_GASCHANGE --> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <event name="gaschange" type="{$type}"> <xsl:attribute name="time"> <xsl:call-template name="timeConvert"> <xsl:with-param name="timeSec"> @@ -327,7 +338,18 @@ <xsl:value-of select="./@ref"/> </xsl:variable> - <event name="gaschange" type="11"> + <xsl:variable name="type"> + <xsl:choose> + <xsl:when test="translate(//gasdefinitions/mix[@id=$idx]/he|//u:gasdefinitions/u:mix[@id=$idx]/u:he|//u1:gasdefinitions/u1:mix[@id=$idx]/u1:he, ',', '.') > 0"> + <xsl:value-of select="25"/> <!-- SAMPLE_EVENT_GASCHANGE2 --> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="11"/> <!-- SAMPLE_EVENT_GASCHANGE --> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <event name="gaschange" type="{$type}"> <xsl:attribute name="time"> <xsl:call-template name="timeConvert"> <xsl:with-param name="timeSec"> |