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

diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index c957421..f2d652e 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -43,6 +43,14 @@
           <xsl:attribute name="time">
             <xsl:value-of select="concat(substring($time, 2, 2), ':', 
substring($time, 4, 2))"/>
           </xsl:attribute>
+
+          <!-- If the dive is CCR, create oxygen and diluent cylinders -->
+
+          <xsl:if test="$po2Field >= 0 or $setpointField >= 0 or 
$o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
+            <cylinder description='oxygen' o2="100.0%" use='oxygen' />
+            <cylinder description='diluent' o2="21.0%" use='diluent' />
+          </xsl:if>
+
           <divecomputer model="Imported from CSV" deviceid="ffffffff">
             <xsl:if test="$po2Field >= 0 or $setpointField >= 0 or 
$o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
               <xsl:attribute name="dctype">CCR</xsl:attribute>
-- 
2.1.4

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

Reply via email to