Grab all gas mixes only when no tank data is given

Grabbing all gas mixes was added for Xdeep default cylinders, and it is
not required for other data sources that have tankdata info in the UDDF
file.

See #958

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-11-02 18:35:39 +02:00 committed by Dirk Hohndel
parent 8ea7f40457
commit 4833d6bd72

View file

@ -60,6 +60,9 @@
</xsl:template>
<xsl:template match="dive|u:dive|u1:dive">
<xsl:variable name="tankdata">
<xsl:value-of select="count(//tankdata|//u:tankdata|//u1:tankdata)"/>
</xsl:variable>
<dive>
<!-- Count the amount of temeprature samples during the dive -->
<xsl:variable name="temperatureSamples">
@ -278,7 +281,7 @@
</xsl:for-each>
</xsl:if>
<xsl:if test="/uddf/gasdefinitions != ''">
<xsl:if test="/uddf/gasdefinitions != '' and $tankdata = 0">
<xsl:for-each select="/uddf/gasdefinitions/mix">
<cylinder description="unknown">
<xsl:attribute name="o2">