diff options
Diffstat (limited to 'xslt/xml2manualcsv.xslt')
-rw-r--r-- | xslt/xml2manualcsv.xslt | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt index e0cfb575c..452da66d7 100644 --- a/xslt/xml2manualcsv.xslt +++ b/xslt/xml2manualcsv.xslt @@ -31,13 +31,31 @@ <xsl:text>"</xsl:text> <xsl:value-of select="@duration"/> <xsl:text>"</xsl:text> - <xsl:apply-templates select="divecomputer[1]/depth"/> + <xsl:choose> + <xsl:when test="divecomputer[1]/depth != ''"> + <xsl:apply-templates select="divecomputer[1]/depth"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$fs"/> + <xsl:text>""</xsl:text> + <xsl:value-of select="$fs"/> + <xsl:text>""</xsl:text> + </xsl:otherwise> + </xsl:choose> <xsl:choose> <xsl:when test="divetemperature/@air|divetemperature/@water != ''"> <xsl:apply-templates select="divetemperature"/> </xsl:when> - <xsl:otherwise> + <xsl:when test="divecomputer[1]/temperature != ''"> <xsl:apply-templates select="divecomputer[1]/temperature"/> + </xsl:when> + <xsl:otherwise> + <!-- empty air temperature --> + <xsl:value-of select="$fs"/> + <xsl:text>""</xsl:text> + <!-- water temperature --> + <xsl:value-of select="$fs"/> + <xsl:text>""</xsl:text> </xsl:otherwise> </xsl:choose> <xsl:choose> |