diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-11-02 18:35:39 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-02 21:04:47 -0800 |
commit | 4833d6bd725e1db6fc6592815483b19939ea7a95 (patch) | |
tree | ec8928c8e73f10c9b25c34f76c879b40b067cb30 /xslt | |
parent | 8ea7f404574c2ee571d2dde6bb6be3791e962150 (diff) | |
download | subsurface-4833d6bd725e1db6fc6592815483b19939ea7a95.tar.gz |
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>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/uddf.xslt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt index e15c27e01..d37bf6795 100644 --- a/xslt/uddf.xslt +++ b/xslt/uddf.xslt @@ -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"> |