Limit cylinders to one dive only

With XSLT we have to be specific if we want to apply cylinder iteration
operation to one dive only. Thus using the last dive as reference when
printing cylinder header.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2020-05-31 14:30:33 +03:00 committed by Dirk Hohndel
parent eb455fe0d2
commit 8f7c9bc7d1

View file

@ -38,7 +38,7 @@
$fs)"/> $fs)"/>
<!-- Print cylinder info according to the amount of cylinders in dive --> <!-- Print cylinder info according to the amount of cylinders in dive -->
<xsl:for-each select="dive/cylinder|trip/dive/cylinder"> <xsl:for-each select="dive[position()=last()]/cylinder|trip[position()=last()]/dive[position()=last()]/cylinder">
<xsl:value-of select="concat( <xsl:value-of select="concat(
'&quot;cylinder size (cuft)&quot;', '&quot;cylinder size (cuft)&quot;',
$fs, $fs,
@ -100,7 +100,7 @@
$fs)"/> $fs)"/>
<!-- Print cylinder info according to the amount of cylinders in dive --> <!-- Print cylinder info according to the amount of cylinders in dive -->
<xsl:for-each select="dive/cylinder|trip/dive/cylinder"> <xsl:for-each select="dive[position()=last()]/cylinder|trip[position()=last()]/dive[position()=last()]/cylinder">
<xsl:value-of select="concat( <xsl:value-of select="concat(
'&quot;cylinder size (l)&quot;', '&quot;cylinder size (l)&quot;',
$fs, $fs,