summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
Diffstat (limited to 'xslt')
-rw-r--r--xslt/SuuntoSDM.xslt18
1 files changed, 14 insertions, 4 deletions
diff --git a/xslt/SuuntoSDM.xslt b/xslt/SuuntoSDM.xslt
index 3b41b7d41..90cc5fdc5 100644
--- a/xslt/SuuntoSDM.xslt
+++ b/xslt/SuuntoSDM.xslt
@@ -25,10 +25,20 @@
</xsl:attribute>
<xsl:attribute name="duration">
- <xsl:call-template name="timeConvert">
- <xsl:with-param name="timeSec" select="DIVETIMESEC"/>
- <xsl:with-param name="units" select="$units"/>
- </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="DIVETIMESEC != ''">
+ <xsl:call-template name="timeConvert">
+ <xsl:with-param name="timeSec" select="DIVETIMESEC"/>
+ <xsl:with-param name="units" select="$units"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="timeConvert">
+ <xsl:with-param name="timeSec" select="SAMPLECNT * SAMPLEINTERVAL"/>
+ <xsl:with-param name="units" select="$units"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:attribute>
<xsl:choose>