summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-12-20 21:23:30 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-20 11:30:06 -0800
commit3343634fc9e285caa163be2500a2119aeae68a4a (patch)
tree220944aab82c6af59b1736d5a47a03a0f9ea3c77 /xslt
parent64c735f2aedb1c18ed311ac986ff39b435fd7c79 (diff)
downloadsubsurface-3343634fc9e285caa163be2500a2119aeae68a4a.tar.gz
Add temperature support to manual2xml XSLT
This adds support for importing temperatures from manually kept dive logs. However, this cannot be used before GUI counterpart is added. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/manualcsv2xml.xslt23
1 files changed, 23 insertions, 0 deletions
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt
index 58f04fc98..60a239d46 100644
--- a/xslt/manualcsv2xml.xslt
+++ b/xslt/manualcsv2xml.xslt
@@ -19,6 +19,8 @@
<xsl:param name="notesField" select="notesField"/>
<xsl:param name="weightField" select="weightField"/>
<xsl:param name="dateformat" select="dateformat"/>
+ <xsl:param name="airtempField" select="airtempField"/>
+ <xsl:param name="watertempField" select="watertempField"/>
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
<xsl:variable name="lf"><xsl:text>
@@ -185,6 +187,27 @@
</location>
</xsl:if>
+ <xsl:if test="$airtempField &gt;= 0 or $watertempField &gt;= 0">
+ <temperature>
+ <xsl:if test="$airtempField &gt;= 0">
+ <xsl:attribute name="air">
+ <xsl:call-template name="getFieldByIndex">
+ <xsl:with-param name="index" select="$airtempField"/>
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$watertempField &gt;= 0">
+ <xsl:attribute name="water">
+ <xsl:call-template name="getFieldByIndex">
+ <xsl:with-param name="index" select="$watertempField"/>
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ </temperature>
+ </xsl:if>
+
<xsl:if test="$maxDepthField >= 0 or $meanDepthField >= 0">
<depth>
<xsl:if test="$maxDepthField >= 0">