summaryrefslogtreecommitdiffstats
path: root/xslt/xml2manualcsv.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-01-05 14:07:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-05 09:06:05 -0800
commitc00a5614f3d8d34d1c6f5f200bfc2e37029803fc (patch)
tree7e04ae99b286d2b6fbcff9ec58bd095f5c971bfd /xslt/xml2manualcsv.xslt
parent9e2e62ec4fca801642205bec088ccc03d3af2e1f (diff)
downloadsubsurface-c00a5614f3d8d34d1c6f5f200bfc2e37029803fc.tar.gz
Add required empty fields on CSV export
We need to have empty field printed for every value on the CSV export. Hopefully this is enough. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/xml2manualcsv.xslt')
-rw-r--r--xslt/xml2manualcsv.xslt22
1 files changed, 20 insertions, 2 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index e0cfb575c..452da66d7 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -31,13 +31,31 @@
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="@duration"/>
<xsl:text>&quot;</xsl:text>
- <xsl:apply-templates select="divecomputer[1]/depth"/>
+ <xsl:choose>
+ <xsl:when test="divecomputer[1]/depth != ''">
+ <xsl:apply-templates select="divecomputer[1]/depth"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:choose>
<xsl:when test="divetemperature/@air|divetemperature/@water != ''">
<xsl:apply-templates select="divetemperature"/>
</xsl:when>
- <xsl:otherwise>
+ <xsl:when test="divecomputer[1]/temperature != ''">
<xsl:apply-templates select="divecomputer[1]/temperature"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- empty air temperature -->
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
+ <!-- water temperature -->
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>