diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-12-13 22:00:31 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-13 13:17:49 -0800 |
commit | 88cf25075f4747df76c1bb072afc9f543d0923f4 (patch) | |
tree | 0158d48efeb823ca81334f1c9a3db385b4a11627 /xslt | |
parent | a2bcbae4f3e387c5d8897e8ee5c5852a98410f87 (diff) | |
download | subsurface-88cf25075f4747df76c1bb072afc9f543d0923f4.tar.gz |
Include temperatures properly on uddf import
Adjust to UDDF 3.2 specification and use proper tag name for air
temperature.
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/uddf.xslt | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt index 37c7d4dd0..157aa5995 100644 --- a/xslt/uddf.xslt +++ b/xslt/uddf.xslt @@ -147,14 +147,6 @@ </xsl:attribute> </xsl:if> - <xsl:if test="condition/air_temp|informationbeforedive/airtemperature != ''"> - <divetemperature> - <xsl:attribute name="air"> - <xsl:value-of select="concat(format-number(condition/air_temp|informationbeforedive/airtemperature - 273.15, '0.0'), ' C')"/> - </xsl:attribute> - </divetemperature> - </xsl:if> - <xsl:if test="dive_site_ref/@ref|informationbeforedive/dive_site_ref/@ref != ''"> <location> <xsl:variable name="ref"> @@ -198,15 +190,21 @@ </weightsystem> </xsl:if> - <xsl:for-each select="lowesttemperature|informationafterdive/lowesttemperature|u:lowesttemperature|u:informationafterdive/u:lowesttemperature|u1:lowesttemperature|u1:informationafterdive/u1:lowesttemperature|condition/water_temp"> - <temperature> + <temperature> + <xsl:for-each select="lowesttemperature|informationafterdive/lowesttemperature|u:lowesttemperature|u:informationafterdive/u:lowesttemperature|u1:lowesttemperature|u1:informationafterdive/u1:lowesttemperature|condition/water_temp"> <xsl:if test="$temperatureSamples > 0 or . != 273.15"> <xsl:attribute name="water"> <xsl:value-of select="concat(format-number(.- 273.15, '0.0'), ' C')"/> </xsl:attribute> </xsl:if> - </temperature> - </xsl:for-each> + </xsl:for-each> + <xsl:if test="condition/air_temp|informationbeforedive/airtemperature|u:informationbeforedive/u:airtemperature != ''"> + <xsl:attribute name="air"> + <xsl:value-of select="concat(format-number(condition/air_temp|informationbeforedive/airtemperature|u:informationbeforedive/u:airtemperature - 273.15, '0.0'), ' C')"/> + </xsl:attribute> + </xsl:if> + </temperature> + <divecomputer deviceid="ffffffff"> <xsl:attribute name="model"> |