mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Grab divecomputer/temperature on CSV export
If temperature is recorded by a DC it must be taken from under the divecomputer tag. However, this will prefer the manually written value if such exists. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
74f5842f0c
commit
898a62f888
1 changed files with 9 additions and 2 deletions
|
@ -29,7 +29,14 @@
|
|||
<xsl:value-of select="@duration"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:apply-templates select="divecomputer/depth"/>
|
||||
<xsl:apply-templates select="divetemperature"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="divetemperature/@air|divetemperature/@water != ''">
|
||||
<xsl:apply-templates select="divetemperature"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="divecomputer[1]/temperature"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates select="cylinder"/>
|
||||
<xsl:apply-templates select="location"/>
|
||||
<xsl:apply-templates select="divemaster"/>
|
||||
|
@ -57,7 +64,7 @@
|
|||
<xsl:value-of select="@mean"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="divetemperature">
|
||||
<xsl:template match="divetemperature|temperature">
|
||||
<xsl:value-of select="$fs"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="@air"/>
|
||||
|
|
Loading…
Reference in a new issue