aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/xml2manualcsv.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-12-22 23:04:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-22 14:25:16 -0800
commitf9b7b9bba03341c66c6289e6baa88f5b92ee2c5b (patch)
tree71bca8dde5e7c3ccffa546a83ecc604cfed26edd /xslt/xml2manualcsv.xslt
parentf1b3ecbfa9e02bb5c8402e445ddbf859d238bea8 (diff)
downloadsubsurface-f9b7b9bba03341c66c6289e6baa88f5b92ee2c5b.tar.gz
Take pressure info from first DC on CSV export
Try to grab pressure information from first DC if it is not manually entered. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/xml2manualcsv.xslt')
-rw-r--r--xslt/xml2manualcsv.xslt16
1 files changed, 15 insertions, 1 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index 03e417857..6239bfec9 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -37,7 +37,21 @@
<xsl:apply-templates select="divecomputer[1]/temperature"/>
</xsl:otherwise>
</xsl:choose>
- <xsl:apply-templates select="cylinder"/>
+ <xsl:choose>
+ <xsl:when test="cylinder/@start|cylinder/@end != ''">
+ <xsl:apply-templates select="cylinder"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;</xsl:text>
+ <xsl:value-of select="divecomputer[1]/sample[@pressure]/@pressure"/>
+ <xsl:text>&quot;</xsl:text>
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;</xsl:text>
+ <xsl:value-of select="divecomputer[1]/sample[@pressure][last()]/@pressure"/>
+ <xsl:text>&quot;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="location"/>
<xsl:apply-templates select="divemaster"/>
<xsl:apply-templates select="buddy"/>