summaryrefslogtreecommitdiffstats
path: root/xslt/csv2xml.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-01-23 20:33:41 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-23 21:10:42 -0800
commit803623042ce4844735e327510521c8a9ed0efa20 (patch)
treec66cada835302354671da17421222e3b2ed22d2b /xslt/csv2xml.xslt
parentcde9bc0de9f4b7684336ef7209f47a47c8b751ba (diff)
downloadsubsurface-803623042ce4844735e327510521c8a9ed0efa20.tar.gz
Fix importing CSV files with empty values
Empty values included the rest of the line in the value, instead of leaving it empty. This patch leaves empty values empty. 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, 3 insertions, 1 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index eb4c8761e..ee8b7556e 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -194,7 +194,9 @@
<xsl:value-of select="substring-before($line,$fs)"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$line"/>
+ <xsl:if test="substring-after($line, $fs) = ''">
+ <xsl:value-of select="$line"/>
+ </xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>