diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-04-24 21:11:22 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-25 09:08:52 -0700 |
commit | 0b8ac416bf73f13ae15f5d99d6b6a914061fab53 (patch) | |
tree | ef927ff41398a2aaa5aa2448e481c5c86334c0bd /xslt | |
parent | 1fec953a13bfa16521c65b1b449b6cb883f02ca8 (diff) | |
download | subsurface-0b8ac416bf73f13ae15f5d99d6b6a914061fab53.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> |