diff options
author | Anton Lundin <glance@acc.umu.se> | 2013-11-21 23:48:37 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-21 15:53:54 -0800 |
commit | cf06f78892c3d96fc62c4861dc0f29f8c1deafa4 (patch) | |
tree | b5a37081204606c3b53eb8ff18563ca6588d585b /xslt/csv2xml.xslt | |
parent | 1a0adea0cccd98a1300885e775e6420bd04899fb (diff) | |
download | subsurface-cf06f78892c3d96fc62c4861dc0f29f8c1deafa4.tar.gz |
Make temperature optional in csv import
This adds a checkbox to be able to import csv files without temperature.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/csv2xml.xslt')
-rw-r--r-- | xslt/csv2xml.xslt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index 5c9abfe1e..677e83613 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -96,10 +96,14 @@ </xsl:attribute> <xsl:attribute name="temp"> - <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="$tempField"/> - <xsl:with-param name="line" select="$line"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="$tempField >= 0"> + <xsl:call-template name="getFieldByIndex"> + <xsl:with-param name="index" select="$tempField"/> + <xsl:with-param name="line" select="$line"/> + </xsl:call-template> + </xsl:when> + </xsl:choose> </xsl:attribute> </sample> </xsl:if> |