diff options
-rw-r--r-- | xslt/xml2manualcsv.xslt | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt index 727e59a59..b262076cc 100644 --- a/xslt/xml2manualcsv.xslt +++ b/xslt/xml2manualcsv.xslt @@ -240,68 +240,68 @@ <xsl:choose> <xsl:when test="$cylinders < position()"/> <xsl:otherwise> - <xsl:choose> - <xsl:when test="@start|@end != ''"> - <xsl:apply-templates select="."/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$fs"/> - <xsl:text>"</xsl:text> <xsl:choose> - <xsl:when test="$units = 1"> - <xsl:value-of select="concat(format-number((substring-before(@size, ' ') div 14.7 * 3000) * 0.035315, '#.#'), '')"/> + <xsl:when test="@start|@end != ''"> + <xsl:apply-templates select="."/> </xsl:when> <xsl:otherwise> - <xsl:value-of select="substring-before(@size, ' ')"/> - </xsl:otherwise> - </xsl:choose> - <xsl:text>"</xsl:text> - <xsl:value-of select="$fs"/> - <xsl:text>"</xsl:text> - <xsl:choose> - <xsl:when test="$units = 1"> + <xsl:value-of select="$fs"/> + <xsl:text>"</xsl:text> <xsl:choose> - <xsl:when test="substring-before(../divecomputer[1]/sample[@pressure]/@pressure, ' ') > 0"> - <xsl:value-of select="concat(format-number((substring-before(../divecomputer[1]/sample[@pressure]/@pressure, ' ') * 14.5037738007), '#'), '')"/> + <xsl:when test="$units = 1"> + <xsl:value-of select="concat(format-number((substring-before(@size, ' ') div 14.7 * 3000) * 0.035315, '#.#'), '')"/> </xsl:when> <xsl:otherwise> - <xsl:value-of select="''"/> + <xsl:value-of select="substring-before(@size, ' ')"/> </xsl:otherwise> </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="substring-before(../divecomputer[1]/sample[@pressure]/@pressure, ' ')"/> - </xsl:otherwise> - </xsl:choose> - <xsl:text>"</xsl:text> - <xsl:value-of select="$fs"/> - <xsl:text>"</xsl:text> - <xsl:choose> - <xsl:when test="$units = 1"> + <xsl:text>"</xsl:text> + <xsl:value-of select="$fs"/> + <xsl:text>"</xsl:text> <xsl:choose> - <xsl:when test="substring-before(../divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') > 0"> - <xsl:value-of select="concat(format-number((substring-before(../divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 14.5037738007), '#'), '')"/> + <xsl:when test="$units = 1"> + <xsl:choose> + <xsl:when test="substring-before(../divecomputer[1]/sample[@pressure]/@pressure, ' ') > 0"> + <xsl:value-of select="concat(format-number((substring-before(../divecomputer[1]/sample[@pressure]/@pressure, ' ') * 14.5037738007), '#'), '')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="''"/> + </xsl:otherwise> + </xsl:choose> </xsl:when> <xsl:otherwise> - <xsl:value-of select="''"/> + <xsl:value-of select="substring-before(../divecomputer[1]/sample[@pressure]/@pressure, ' ')"/> </xsl:otherwise> </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="substring-before(../divecomputer[1]/sample[@pressure][last()]/@pressure, ' ')"/> + <xsl:text>"</xsl:text> + <xsl:value-of select="$fs"/> + <xsl:text>"</xsl:text> + <xsl:choose> + <xsl:when test="$units = 1"> + <xsl:choose> + <xsl:when test="substring-before(../divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') > 0"> + <xsl:value-of select="concat(format-number((substring-before(../divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 14.5037738007), '#'), '')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="''"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="substring-before(../divecomputer[1]/sample[@pressure][last()]/@pressure, ' ')"/> + </xsl:otherwise> + </xsl:choose> + <xsl:text>"</xsl:text> + <xsl:value-of select="$fs"/> + <xsl:text>"</xsl:text> + <xsl:value-of select="substring-before(@o2, '%')"/> + <xsl:text>"</xsl:text> + <xsl:value-of select="$fs"/> + <xsl:text>"</xsl:text> + <xsl:value-of select="substring-before(@he, '%')"/> + <xsl:text>"</xsl:text> </xsl:otherwise> </xsl:choose> - <xsl:text>"</xsl:text> - <xsl:value-of select="$fs"/> - <xsl:text>"</xsl:text> - <xsl:value-of select="substring-before(@o2, '%')"/> - <xsl:text>"</xsl:text> - <xsl:value-of select="$fs"/> - <xsl:text>"</xsl:text> - <xsl:value-of select="substring-before(@he, '%')"/> - <xsl:text>"</xsl:text> - </xsl:otherwise> - </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:for-each> |