summaryrefslogtreecommitdiffstats
path: root/xslt/jdivelog2subsurface.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2012-10-21 23:11:42 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-21 20:46:50 -0700
commit25ddf1caee98595bb62313de965ea24b89f495c3 (patch)
treec5447df558b8eb8788971ba3536d546535f0ae30 /xslt/jdivelog2subsurface.xslt
parentdbafd6cec664350dcaedb87c66c2d8e24fb803c5 (diff)
downloadsubsurface-25ddf1caee98595bb62313de965ea24b89f495c3.tar.gz
Map JDiveLog alarms to Subsurface events
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/jdivelog2subsurface.xslt')
-rw-r--r--xslt/jdivelog2subsurface.xslt18
1 files changed, 17 insertions, 1 deletions
diff --git a/xslt/jdivelog2subsurface.xslt b/xslt/jdivelog2subsurface.xslt
index 6e85cbfbc..4e900f59b 100644
--- a/xslt/jdivelog2subsurface.xslt
+++ b/xslt/jdivelog2subsurface.xslt
@@ -160,7 +160,23 @@ Comment: <xsl:value-of select="Comment"/>
<!-- events -->
<xsl:for-each select="DIVE/SAMPLES/ALARM">
<xsl:if test=". != 'SURFACE'">
- <event type="" name="{.}">
+ <event type="">
+ <xsl:attribute name="name">
+ <xsl:choose>
+ <xsl:when test=". = 'SLOW'">
+ <xsl:value-of select="'ascent'"/>
+ </xsl:when>
+ <xsl:when test=". = 'ATTENTION'">
+ <xsl:value-of select="'violation'"/>
+ </xsl:when>
+ <xsl:when test=". = 'DECO'">
+ <xsl:value-of select="'deco'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
<xsl:attribute name="time">
<xsl:call-template name="timeConvert">
<xsl:with-param name="timeSec" select="count(preceding-sibling::D) * $delta"/>