summaryrefslogtreecommitdiffstats
path: root/xslt/xml2manualcsv.xslt
diff options
context:
space:
mode:
Diffstat (limited to 'xslt/xml2manualcsv.xslt')
-rw-r--r--xslt/xml2manualcsv.xslt11
1 files changed, 9 insertions, 2 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index fa3868cf8..93894a7b5 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -29,7 +29,14 @@
<xsl:value-of select="@duration"/>
<xsl:text>&quot;</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>&quot;</xsl:text>
</xsl:template>
- <xsl:template match="divetemperature">
+ <xsl:template match="divetemperature|temperature">
<xsl:value-of select="$fs"/>
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="@air"/>