summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-12-31 13:27:41 +0200
committerGravatar Miika Turkia <miika.turkia@gmail.com>2016-12-31 13:27:41 +0200
commit2ce1b4e668defe171d734dd7a34533cd7c1df422 (patch)
tree985ea0173e5856af8241161286a85478fe0d3719 /xslt
parent876605458156190f845cc931bff756690f34b8ff (diff)
downloadsubsurface-2ce1b4e668defe171d734dd7a34533cd7c1df422.tar.gz
AV1 import: parse dive mode
This is tested only with OC and requires that other modes use compatible terms for the mode. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/av1.xslt24
1 files changed, 17 insertions, 7 deletions
diff --git a/xslt/av1.xslt b/xslt/av1.xslt
index e5f73fa88..1569a46f6 100644
--- a/xslt/av1.xslt
+++ b/xslt/av1.xslt
@@ -44,13 +44,23 @@
<xsl:param name="lineno"/>
<xsl:param name="remaining"/>
- <!-- For now, parse only depth values - they are numeric -->
- <xsl:if test="string(number(substring($line, 1, 1))) != 'NaN'">
- <xsl:call-template name="printFields">
- <xsl:with-param name="line" select="$line"/>
- <xsl:with-param name="lineno" select="'0'"/>
- </xsl:call-template>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="string(number(substring($line, 1, 1))) != 'NaN'">
+ <xsl:call-template name="printFields">
+ <xsl:with-param name="line" select="$line"/>
+ <xsl:with-param name="lineno" select="'0'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="substring-before($line, '=') = 'DiveMode'">
+ <xsl:attribute name="dctype">
+ <xsl:value-of select="substring-before(substring-after($line, '= '), ' ')"/>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:if test="$remaining != ''">
<xsl:call-template name="printLine">