This adds support for importing cylinder information from at least Xdeep
and Diving Log v 5.0.

miika
From c805ee81ad72571c3cac4d71db74efb7e80b7299 Mon Sep 17 00:00:00 2001
From: Miika Turkia <[email protected]>
Date: Wed, 17 Dec 2014 10:41:35 +0200
Subject: [PATCH] Support cylinder information from Xdeep and Diving Log

Signed-off-by: Miika Turkia <[email protected]>
---
 xslt/uddf.xslt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index 0604b22..26947e5 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -278,6 +278,21 @@
         </xsl:for-each>
       </xsl:if>
 
+      <xsl:if test="/uddf/gasdefinitions != ''">
+        <xsl:for-each select="/uddf/gasdefinitions/mix">
+          <cylinder description="{name}">
+            <xsl:attribute name="o2">
+              <xsl:value-of select="concat(o2 * 100, '%')"/>
+            </xsl:attribute>
+            <xsl:if test="he &gt; 0">
+              <xsl:attribute name="he">
+                <xsl:value-of select="concat(he * 100, '%')"/>
+              </xsl:attribute>
+            </xsl:if>
+          </cylinder>
+        </xsl:for-each>
+      </xsl:if>
+
       <xsl:for-each select="tankdata|u:tankdata|u1:tankdata">
         <cylinder>
           <xsl:variable name="gas">
-- 
1.9.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to