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:
committed by
Dirk Hohndel
parent
64c9fff850
commit
bb39a8730b
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user