diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2013-12-28 09:05:37 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-28 07:43:34 -0800 |
commit | 9731f85fc603bf5c7b9cc7107d17f0e78b5a745e (patch) | |
tree | 1dc297d74099152a48c89339d39d7eafb8a63f18 /xslt/uddf.xslt | |
parent | 16d7f5e86e74db4cb34109a3dcb228d13d389381 (diff) | |
download | subsurface-9731f85fc603bf5c7b9cc7107d17f0e78b5a745e.tar.gz |
Cylinder support improved on UDDF import
This patch adds support for cylinders for UDDF version 3.2.1.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/uddf.xslt')
-rw-r--r-- | xslt/uddf.xslt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt index 0d85ba4eb..b3fa973d2 100644 --- a/xslt/uddf.xslt +++ b/xslt/uddf.xslt @@ -271,6 +271,39 @@ </xsl:for-each> </xsl:if> + <xsl:for-each select="tankdata|u:tankdata|u1:tankdata"> + <cylinder> + <xsl:variable name="gas"> + <xsl:value-of select="link/@ref|u:link/@ref|u1:link/@ref"/> + </xsl:variable> + + <xsl:if test="tankvolume|u:tankvolume|u1:tankvolume != ''"> + <xsl:attribute name="size"> + <xsl:value-of select="tankvolume|u:tankvolume|u1:tankvolume"/> + </xsl:attribute> + </xsl:if> + + <xsl:attribute name="o2"> + <xsl:value-of select="//gasdefinitions/mix[@id=$gas]/o2|//u:gasdefinitions/u:mix[@id=$gas]/u:o2|//u1:gasdefinitions/u1:mix[@id=$gas]/u1:o2"/> + </xsl:attribute> + <xsl:attribute name="he"> + <xsl:value-of select="//gasdefinitions/mix[@id=$gas]/he|//u:gasdefinitions/u:mix[@id=$gas]/u:he|//u1:gasdefinitions/u1:mix[@id=$gas]/u1:he"/> + </xsl:attribute> + + <xsl:if test="tankpressurebegin|u:tankpressurebegin|u1:tankpressurebegin != ''"> + <xsl:attribute name="start"> + <xsl:value-of select="concat(format-number(tankpressurebegin|u:tankpressurebegin|u1:tankpressurebegin div 100000, '#.#'), ' bar')"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="tankpressureend|u:tankpressureend|u1:tankpressureend != ''"> + <xsl:attribute name="end"> + <xsl:value-of select="concat(format-number(tankpressureend|u:tankpressureend|u1:tankpressureend div 100000, '#.#'), ' bar')"/> + </xsl:attribute> + </xsl:if> + </cylinder> + </xsl:for-each> + <xsl:apply-templates select="/uddf/gasdefinitions|/u:uddf/u:gasdefinitions|/u1:uddf/u1:gasdefinitions"/> <depth> <xsl:for-each select="greatestdepth|informationafterdive/greatestdepth|u:greatestdepth|u:informationafterdive/u:greatestdepth|u1:greatestdepth|u1:informationafterdive/u1:greatestdepth|max_depth"> |