summaryrefslogtreecommitdiffstats
path: root/xslt/commonTemplates.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'xslt/commonTemplates.xsl')
-rw-r--r--xslt/commonTemplates.xsl8
1 files changed, 5 insertions, 3 deletions
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl
index 18b50b739..74362df92 100644
--- a/xslt/commonTemplates.xsl
+++ b/xslt/commonTemplates.xsl
@@ -330,9 +330,8 @@
<xsl:choose>
<xsl:when test="substring($line, 1, 1) = '&quot;'">
<xsl:choose>
- <xsl:when test="substring-before(substring-after($line, '&quot;'), concat('&quot;', $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, '&quot;'), concat('&quot;', $fs)) != '' or substring($line, string-length($line), 1)">
<xsl:choose>
<xsl:when test="substring-before(substring-before(substring-after($line, '&quot;'), concat('&quot;', $fs)), '&quot;') != ''">
<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) = '&quot;'">
+ <xsl:value-of select="substring-before(substring-after($line, '&quot;'), '&quot;')"/>
+ </xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-before(substring-after($line, '&quot;'), concat('&quot;', $fs))"/>