aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/csv2xml.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-11-09 21:39:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-11-15 03:22:42 -0800
commitc78bbf688399cad7de7e3c058baa07f3d5513cff (patch)
tree4f9d80195485923b3217003542889b825562eff2 /xslt/csv2xml.xslt
parent50ea5ec29655ffcaec03ff1322d6aaec8df6cbbb (diff)
downloadsubsurface-c78bbf688399cad7de7e3c058baa07f3d5513cff.tar.gz
CSV import: support for decimal comma on temperature
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/csv2xml.xslt')
-rw-r--r--xslt/csv2xml.xslt4
1 files changed, 2 insertions, 2 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index 83b0d579a..226cd2de6 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -290,10 +290,10 @@
<xsl:attribute name="temp">
<xsl:choose>
<xsl:when test="$units = 0">
- <xsl:value-of select="$temp"/>
+ <xsl:value-of select="translate($temp, ',', '.')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="concat(format-number(($temp - 32) * 5 div 9, '0.0'), ' C')"/>
+ <xsl:value-of select="concat(format-number((translate($temp, ',', '.') - 32) * 5 div 9, '0.0'), ' C')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>