mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Hack double tank support for export to divelogs
If the cylinder description starts with D%d we test if the size in description matches the cylinder size. If the cylinder size is double compared to size in description, we mark the dive as double tank dive to divelogs.de. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
64c9fff850
commit
bb39a8730b
1 changed files with 15 additions and 1 deletions
|
@ -69,8 +69,22 @@
|
|||
<CYLINDERDESCRIPTION>
|
||||
<xsl:value-of select="cylinder[position() = $cylinder]/@description"/>
|
||||
</CYLINDERDESCRIPTION>
|
||||
|
||||
<xsl:variable name="double">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring(cylinder[position() = $cylinder]/@description, 1, 1) = 'D' and substring-before(substring(cylinder[position() = $cylinder]/@description, 2), ' ') * 2 = substring-before(cylinder[position() = $cylinder]/@size, ' ')">
|
||||
<xsl:value-of select="'2'"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'1'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<DBLTANK>
|
||||
<xsl:value-of select="$double - 1"/>
|
||||
</DBLTANK>
|
||||
<CYLINDERSIZE>
|
||||
<xsl:value-of select="substring-before(cylinder[position() = $cylinder]/@size, ' ')"/>
|
||||
<xsl:value-of select="substring-before(cylinder[position() = $cylinder]/@size, ' ') div $double"/>
|
||||
</CYLINDERSIZE>
|
||||
<CYLINDERSTARTPRESSURE>
|
||||
<xsl:choose>
|
||||
|
|
Loading…
Add table
Reference in a new issue