diff options
Diffstat (limited to 'xslt/csv2xml.xslt')
-rw-r--r-- | xslt/csv2xml.xslt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index 3c62111fb..9ec697a4d 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -214,7 +214,7 @@ </xsl:variable> - <xsl:if test="number($value) = $value or number(substring-before($value, ':')) = substring-before($value, ':')"> + <xsl:if test="number(translate($value, ',', '.')) = translate($value, ',', '.') or number(substring-before($value, ':')) = substring-before($value, ':')"> <sample> <xsl:attribute name="time"> <xsl:choose> @@ -225,7 +225,7 @@ </xsl:with-param> </xsl:call-template> </xsl:when> - <xsl:when test="number($value) = $value"> + <xsl:when test="number(translate($value, ',', '.')) = translate($value, ',', '.')"> <!-- We assume time in seconds --> <xsl:call-template name="sec2time"> @@ -235,6 +235,10 @@ <!-- Well, I suppose it was min.sec --> <xsl:value-of select="substring-before($value, '.') * 60 + substring-after($value, '.')" /> </xsl:when> + <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> |