mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
64c735f2ae
commit
3343634fc9
1 changed files with 23 additions and 0 deletions
|
@ -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 >= 0 or $watertempField >= 0">
|
||||
<temperature>
|
||||
<xsl:if test="$airtempField >= 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 >= 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">
|
||||
|
|
Loading…
Reference in a new issue