diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2018-05-27 08:32:30 +0300 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-05-27 23:18:01 +0300 |
commit | ddd35bc9412dca364f014296cb6fc9018f558673 (patch) | |
tree | 3689e9696883fb3abdcea28e9104582ef8212070 /xslt | |
parent | cf4e3e17aa4408331050154001476b578033adcb (diff) | |
download | subsurface-ddd35bc9412dca364f014296cb6fc9018f558673.tar.gz |
Shearwater import: add support for DC reported ceiling
This adds stopdepth, stoptime and in_deco attributes on Shearwater XML
import. The output from the XSLT is very verbose (these values are
printed for each sample), but as Subsurface cleans things up, there is
no need to do any more magic on XSLT side.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/shearwater.xslt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/xslt/shearwater.xslt b/xslt/shearwater.xslt index ccadfd1a1..d29d7b02a 100644 --- a/xslt/shearwater.xslt +++ b/xslt/shearwater.xslt @@ -192,6 +192,33 @@ <xsl:value-of select="concat(currentNdl, ':00 min')"/> </xsl:attribute> </xsl:if> + <xsl:if test="firstStopDepth != ''"> + <xsl:attribute name="stopdepth"> + <xsl:choose> + <xsl:when test="$units = 'imperial'"> + <xsl:value-of select="concat(format-number(firstStopDepth * 0.3048, '0.00'), ' m')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat(firstStopDepth, ' m')"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="stoptime"> + <xsl:value-of select="concat(firstStopTime, ' min')"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="firstStopDepth = 0"> + <xsl:attribute name="in_deco"> + <xsl:value-of select="'0'"/> + </xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="in_deco"> + <xsl:value-of select="'1'"/> + </xsl:attribute> + </xsl:otherwise> + </xsl:choose> + </xsl:if> </sample> </xsl:for-each> </divecomputer> |