diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-01-24 17:03:16 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-24 14:51:00 -0800 |
commit | 8e75243a5bdd5316b18379b71971e9a139382617 (patch) | |
tree | ef8c7a5f56d4a4fb43e93a080a63c1127bbc08e8 | |
parent | fb367b22b09b9b1a4bf82fd2fd7b36c0fffa95ee (diff) | |
download | subsurface-8e75243a5bdd5316b18379b71971e9a139382617.tar.gz |
Improve detection of continuation lines in CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | xslt/manualcsv2xml.xslt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt index ef6397580..50fc241e8 100644 --- a/xslt/manualcsv2xml.xslt +++ b/xslt/manualcsv2xml.xslt @@ -396,7 +396,15 @@ <xsl:value-of select="substring-before(substring-after($line, '"'), '"')"/> </xsl:when> <xsl:otherwise> - <xsl:value-of select="concat(substring-after($line, '"'), substring-before($remaining, '"'))"/> + <xsl:choose> + <!-- quoted string has new line --> + <xsl:when test="string-length(substring-after($line, '"')) = string-length(translate(substring-after($line, '"'), '"', ''))"> + <xsl:value-of select="concat(substring-after($line, '"'), substring-before($remaining, '"'))"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="''"/> + </xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:when> |