Add support for decimal comma on UDDF import

Gas changes generated by Xdeep can contain mix information with decimal
comma instead of decimal point. Thus we need to convert the comma to
point before performing mathematical operations on it.

Fixes #612

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-07-11 22:05:58 +03:00 committed by Dirk Hohndel
parent 964401c374
commit e65c4ac55e

View file

@ -313,7 +313,7 @@
<xsl:attribute name="value">
<xsl:call-template name="gasConvert">
<xsl:with-param name="mix">
<xsl:value-of select="//gas_def/gas_mix[@id=$idx]/o2"/>
<xsl:value-of select="translate(//gas_def/gas_mix[@id=$idx]/o2, ',', '.')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:attribute>
@ -339,7 +339,7 @@
<xsl:attribute name="value">
<xsl:call-template name="gasConvert">
<xsl:with-param name="mix">
<xsl:value-of select="//gasdefinitions/mix[@id=$idx]/o2|//u:gasdefinitions/u:mix[@id=$idx]/u:o2|//u1:gasdefinitions/u1:mix[@id=$idx]/u1:o2"/>
<xsl:value-of select="translate(//gasdefinitions/mix[@id=$idx]/o2|//u:gasdefinitions/u:mix[@id=$idx]/u:o2|//u1:gasdefinitions/u1:mix[@id=$idx]/u1:o2, ',', '.')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:attribute>