summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2018-07-10 19:48:42 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-10 10:21:13 -0700
commit7103f36c7c9ed0117a9f600cee6b2565d98a6638 (patch)
treebbd97c43821a28a986fc38880bd04c78f030e63b /xslt
parentdc2f0f8e48e12dbf60639df15dcf1ea5069d2db8 (diff)
downloadsubsurface-7103f36c7c9ed0117a9f600cee6b2565d98a6638.tar.gz
UDDF import: add support for decimal comma for depth
Depth values might apparently contain decimal comma instead of decimal point with some locale settings. Thus add support for both of them. Fixes #1485 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/uddf.xslt6
1 files changed, 3 insertions, 3 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index a052eeba3..22d9814a1 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -520,17 +520,17 @@
<xsl:choose>
<xsl:when test="depth != ''">
<xsl:attribute name="depth">
- <xsl:value-of select="concat(format-number(depth, '0.00'), ' m')"/>
+ <xsl:value-of select="concat(format-number(translate(depth, ',', '.'), '0.00'), ' m')"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="u:depth|u1:depth != ''">
<xsl:attribute name="depth">
- <xsl:value-of select="concat(format-number(u:depth|u1:depth, '0.00'), ' m')"/>
+ <xsl:value-of select="concat(format-number(translate(u:depth|u1:depth, ',', '.'), '0.00'), ' m')"/>
</xsl:attribute>
</xsl:when>
<xsl:when test=". != 0">
<xsl:attribute name="depth">
- <xsl:value-of select="concat(format-number(., '0.00'), ' m')"/>
+ <xsl:value-of select="concat(format-number(translate(., ',', '.'), '0.00'), ' m')"/>
</xsl:attribute>
</xsl:when>
</xsl:choose>