[PATCH 03/10] Grab manually added air temperature on UDDF export

Miika Turkia miika.turkia at gmail.com
Sat Dec 13 12:00:29 PST 2014


Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 xslt/uddf-export.xslt | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
index 8350986..da44e0a 100644
--- a/xslt/uddf-export.xslt
+++ b/xslt/uddf-export.xslt
@@ -256,12 +256,10 @@
         <datetime>
           <xsl:value-of select="concat(./@date, 'T', ./@time)"/>
         </datetime>
-        <xsl:for-each select="divecomputer">
-          <xsl:if test="temperature/@air|divetemperature/@air != ''">
-            <airtemperature>
-              <xsl:value-of select="format-number(substring-before(temperature/@air|divetemperature/@air, ' ') + 273.15, '0.00')"/>
-            </airtemperature>
-          </xsl:if>
+        <xsl:for-each select="divecomputer/temperature/@air|divecomputer/divetemperature/@air|divetemperature/@air">
+          <airtemperature>
+            <xsl:value-of select="format-number(substring-before(., ' ') + 273.15, '0.00')"/>
+          </airtemperature>
         </xsl:for-each>
         <xsl:if test="parent::trip">
           <tripmembership ref="trip{generate-id(..)}"/>
-- 
1.9.1



More information about the subsurface mailing list