[PATCH 2/5] Quote header line properly on CSV export

Miika Turkia miika.turkia at gmail.com
Sat Apr 26 00:55:40 PDT 2014


Let's make the export consistent by quoting the header line the same way
the sample rows are quoted.

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 xslt/xml2csv.xslt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xslt/xml2csv.xslt b/xslt/xml2csv.xslt
index f647537..56461bc 100644
--- a/xslt/xml2csv.xslt
+++ b/xslt/xml2csv.xslt
@@ -6,7 +6,7 @@
   <xsl:variable name="fs">,</xsl:variable>
 
   <xsl:template match="/divelog/dives">
-    <xsl:value-of select='concat("dive number", $fs, "dive date", $fs, "dive time", $fs, "time", $fs, "depth", $fs, "temperature", $fs, "pressure")'/>
+    <xsl:value-of select="concat('"dive number"', $fs, '"dive date"', $fs, '"dive time"', $fs, '"time"', $fs, '"depth"', $fs, '"temperature"', $fs, '"pressure"')"/>
     <xsl:text>
 </xsl:text>
     <xsl:apply-templates select="dive|trip/dive"/>
-- 
1.8.3.2



More information about the subsurface mailing list