summaryrefslogtreecommitdiffstats
path: root/xslt/divelogs-export.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-09-12 21:16:21 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-12 12:36:26 -0700
commitf38f8ce4c9a04921a5835b5390b665ef74d05390 (patch)
tree70ee8afceba0ae21ea5efe2bf225ae45f0704855 /xslt/divelogs-export.xslt
parent6427564d33caf59a85e6521366afc5e82fefa5fd (diff)
downloadsubsurface-f38f8ce4c9a04921a5835b5390b665ef74d05390.tar.gz
Add importing of working pressure from divelogs.de
We were missing the import of cylinders' working pressure when syncing with divelogs.de. This piece of information is required for proper unit conversions when user uses imperial units for displaying the dive information. (Both Subsurface and divelogs.de use metric internally, or at least the export from divelogs.de is in metric.) See #907 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/divelogs-export.xslt')
-rw-r--r--xslt/divelogs-export.xslt10
1 files changed, 10 insertions, 0 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt
index 7877c148f..b97b5fbcc 100644
--- a/xslt/divelogs-export.xslt
+++ b/xslt/divelogs-export.xslt
@@ -114,6 +114,11 @@
</xsl:otherwise>
</xsl:choose>
</CYLINDERENDPRESSURE>
+ <xsl:if test="cylinder[position() = $cylinder]/@workpressure != ''">
+ <WORKINGPRESSURE>
+ <xsl:value-of select="substring-before(cylinder[position() = $cylinder]/@workpressure, ' ')"/>
+ </WORKINGPRESSURE>
+ </xsl:if>
<ADDITIONALTANKS>
<xsl:for-each select="cylinder[position() != $cylinder]">
@@ -159,6 +164,11 @@
<CYLINDERENDPRESSURE>
<xsl:value-of select="@end"/>
</CYLINDERENDPRESSURE>
+ <xsl:if test="@workpressure != ''">
+ <WORKINGPRESSURE>
+ <xsl:value-of select="substring-before(@workpressure, ' ')"/>
+ </WORKINGPRESSURE>
+ </xsl:if>
<O2PCT>
<xsl:value-of select="substring-before(@o2, '%')"/>
</O2PCT>