diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-05-07 15:34:27 +0300 |
---|---|---|
committer | Miika Turkia <miika.turkia@gmail.com> | 2017-05-07 15:34:27 +0300 |
commit | 6e1c00078dc440ca96745315455b731ca3a5fa09 (patch) | |
tree | 8f095b0c07018069742316a8047b9fe50aaf07ae /xslt | |
parent | cef56c6290c82b882181bf7477ee96ad4fa65dcd (diff) | |
download | subsurface-6e1c00078dc440ca96745315455b731ca3a5fa09.tar.gz |
Add dive mode support for Seabear import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/csv2xml.xslt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index fadb5f443..efe7c37ef 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -27,6 +27,7 @@ <xsl:param name="delta" select="delta"/> <xsl:param name="hw" select="hw"/> <xsl:param name="diveNro" select="diveNro"/> + <xsl:param name="diveMode" select="diveMode"/> <xsl:output method="xml" indent="yes"/> <xsl:variable name="lf"><xsl:text> @@ -144,6 +145,23 @@ <xsl:copy-of select="number($o2sensor1Field >= 0) + number($o2sensor2Field >= 0) + number($o2sensor3Field >= 0)" /> </xsl:attribute> </xsl:if> + + <!-- Seabear specific dive modes --> + <xsl:if test="string-length($diveMode) > 0"> + <xsl:if test="$diveMode = 'OC' or $diveMode = 'APNEA' or $diveMode = 'CCR' or $diveMode = 'CCR SENSORBOARD'"> + <xsl:attribute name="dctype"> + <xsl:choose> + <xsl:when test="$diveMode = 'APNEA'"> + <xsl:value-of select="'Freedive'"/> + </xsl:when> + <xsl:when test="$diveMode = 'CCR' or $diveMode = 'CCR SENSORBOARD' "> + <xsl:value-of select="'CCR'"/> + </xsl:when> + </xsl:choose> + </xsl:attribute> + </xsl:if> + </xsl:if> + <xsl:call-template name="printLine"> <xsl:with-param name="line" select="substring-before(//csv, $lf)"/> <xsl:with-param name="lineno" select="'1'"/> |