diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-03-14 07:57:05 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-04-01 08:06:09 -0700 |
commit | 841d1b4fac6c08090c4d9951ce7c4a1dffb8ef45 (patch) | |
tree | 17994dc6eb1afa8b7c2858a69705109e1a096cc3 /xslt | |
parent | acd791b7c14a9f28cd65dbd62df489b8c0088f26 (diff) | |
download | subsurface-841d1b4fac6c08090c4d9951ce7c4a1dffb8ef45.tar.gz |
CSV export: convert cylinder size to imperial
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/xml2manualcsv.xslt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt index 4a35d8b2e..bde481b75 100644 --- a/xslt/xml2manualcsv.xslt +++ b/xslt/xml2manualcsv.xslt @@ -71,7 +71,7 @@ <xsl:text>"</xsl:text> <xsl:choose> <xsl:when test="$units = 1"> - <xsl:value-of select="cylinder/@description"/> + <xsl:value-of select="concat(format-number((cylinder[1]/@size div 14.7 * 3000) * 0.035315, '#.#'), ' cuft')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="cylinder[1]/@size"/> @@ -256,7 +256,14 @@ <xsl:template match="cylinder"> <xsl:value-of select="$fs"/> <xsl:text>"</xsl:text> - <xsl:value-of select="@size"/> + <xsl:choose> + <xsl:when test="$units = 1"> + <xsl:value-of select="concat(format-number((substring-before(@size, ' ') div 14.7 * 3000) * 0.035315, '#.#'), ' cuft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@size"/> + </xsl:otherwise> + </xsl:choose> <xsl:text>"</xsl:text> <xsl:value-of select="$fs"/> <xsl:text>"</xsl:text> |