diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-05-07 07:52:55 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-07 07:52:55 -0700 |
commit | d7cf3408e5d2f8c7f5ce25fa2b330cc3e75ff489 (patch) | |
tree | ed03b77b996476acff2ed848f107e4c0e75536e2 /xslt | |
parent | 75762e5f16bf80c853ecda4fd57a16adcaa22926 (diff) | |
parent | 21cdc647121455a3dd5e3e1dc76c2294fd017369 (diff) | |
download | subsurface-d7cf3408e5d2f8c7f5ce25fa2b330cc3e75ff489.tar.gz |
Merge branch 'seabear-refactor'
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/csv2xml.xslt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index 960f48395..efe7c37ef 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -26,6 +26,8 @@ <xsl:param name="separatorIndex" select="separatorIndex"/> <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> @@ -111,6 +113,12 @@ </xsl:attribute> </xsl:if> + <xsl:if test="string-length($diveNro) > 0"> + <xsl:attribute name="number"> + <xsl:value-of select="$diveNro"/> + </xsl:attribute> + </xsl:if> + <!-- If the dive is CCR, create oxygen and diluent cylinders --> <xsl:if test="$po2Field >= 0 or $setpointField >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0"> @@ -137,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'"/> |