diff options
author | 2016-04-24 21:11:22 +0300 | |
---|---|---|
committer | 2016-04-25 12:31:58 -0700 | |
commit | 9d26f40279826ab81f5c4d95b4670b06ab172bca (patch) | |
tree | 5392ba96d59b6374542e64bc36c09a58b863b759 /xslt | |
parent | 6cc6c045216d6d525f68b8fc5b86c592af4f589a (diff) | |
download | subsurface-9d26f40279826ab81f5c4d95b4670b06ab172bca.tar.gz |
CSV import: support min.sec format
Assume a format containing a dot to be min.sec as defined in DL7
specification.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/csv2xml.xslt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index 5ce584745..0f8362936 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -166,7 +166,15 @@ <xsl:call-template name="sec2time"> <xsl:with-param name="timeSec"> - <xsl:value-of select="$value"/> + <xsl:choose> + <xsl:when test="substring-after($value, '.') != ''"> + <!-- Well, I suppose it was min.sec --> + <xsl:value-of select="substring-before($value, '.') * 60 + substring-after($value, '.')" /> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$value"/> + </xsl:otherwise> + </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:when> |