mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
CSV import: import of last field
The last field ends with new line instead of field separator. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
3f5b5f7b3e
commit
f040912395
1 changed files with 5 additions and 3 deletions
|
@ -330,9 +330,8 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="substring($line, 1, 1) = '"'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-before(substring-after($line, '"'), concat('"', $fs)) != ''">
|
||||
|
||||
|
||||
<!-- We either have a field that ends with quote and field separator, or the last character of line is quote -->
|
||||
<xsl:when test="substring-before(substring-after($line, '"'), concat('"', $fs)) != '' or substring($line, string-length($line), 1)">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-before(substring-before(substring-after($line, '"'), concat('"', $fs)), '"') != ''">
|
||||
<xsl:call-template name="unquote">
|
||||
|
@ -340,6 +339,9 @@
|
|||
<xsl:with-param name="value" select="''" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="substring($line, string-length($line), 1) = '"'">
|
||||
<xsl:value-of select="substring-before(substring-after($line, '"'), '"')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
||||
<xsl:value-of select="substring-before(substring-after($line, '"'), concat('"', $fs))"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue