Signed-off-by: Miika Turkia <[email protected]>
---
xslt/manualcsv2xml.xslt | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt
index 287524d..4e95d6f 100644
--- a/xslt/manualcsv2xml.xslt
+++ b/xslt/manualcsv2xml.xslt
@@ -183,7 +183,14 @@
<xsl:value-of select="$duration * 60"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$duration"/>
+ <xsl:choose>
+ <xsl:when test="string-length(translate($duration,
translate($duration, ':', ''), '')) = 2">
+ <xsl:value-of select="concat(substring-before($duration,
':') * 60 + substring-before(substring-after($duration, ':'), ':'), ':',
substring-after(substring-after($duration, ':'), ':'))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$duration"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
--
2.5.0
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface