aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/xml2manualcsv.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-03-13 21:25:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-01 08:06:09 -0700
commit1c03cb259e648d68c3e2d38d281128619600bac9 (patch)
tree1d345604e9f5af06d589557df4c77c245020a42f /xslt/xml2manualcsv.xslt
parent3a003f4c1052a29219057a5cf513d6f53325d755 (diff)
downloadsubsurface-1c03cb259e648d68c3e2d38d281128619600bac9.tar.gz
CSV export: export only existing temperatures
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt/xml2manualcsv.xslt')
-rw-r--r--xslt/xml2manualcsv.xslt8
1 files changed, 6 insertions, 2 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index 6064a4c72..4a35d8b2e 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -230,7 +230,9 @@
<xsl:text>&quot;</xsl:text>
<xsl:choose>
<xsl:when test="$units = 1">
- <xsl:value-of select="concat(format-number((substring-before(@air, ' ') * 1.8) + 32, '0.0'), ' F')"/>
+ <xsl:if test="substring-before(@air, ' ') &gt; 0">
+ <xsl:value-of select="concat(format-number((substring-before(@air, ' ') * 1.8) + 32, '0.0'), ' F')"/>
+ </xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@air"/>
@@ -241,7 +243,9 @@
<xsl:text>&quot;</xsl:text>
<xsl:choose>
<xsl:when test="$units = 1">
- <xsl:value-of select="concat(format-number((substring-before(@water, ' ') * 1.8) + 32, '0.0'), ' F')"/>
+ <xsl:if test="substring-before(@water, ' ') &gt; 0">
+ <xsl:value-of select="concat(format-number((substring-before(@water, ' ') * 1.8) + 32, '0.0'), ' F')"/>
+ </xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@water"/>