[PATCH] Map JDiveLog alarms to Subsurface events
Miika Turkia
miika.turkia at gmail.com
Sun Oct 21 13:11:42 PDT 2012
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
xslt/jdivelog2subsurface.xslt | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/xslt/jdivelog2subsurface.xslt b/xslt/jdivelog2subsurface.xslt
index 6e85cbf..4e900f5 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"/>
--
1.7.9.5
More information about the subsurface
mailing list