[PATCH 3/4] New location management for divelogs.de export

Miika Turkia miika.turkia at gmail.com
Sun Sep 6 11:40:14 PDT 2015


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

diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt
index 8a0b792..7877c14 100644
--- a/xslt/divelogs-export.xslt
+++ b/xslt/divelogs-export.xslt
@@ -34,8 +34,11 @@
     <DIVETIMESEC>
       <xsl:value-of select="$duration"/>
     </DIVETIMESEC>
+      <xsl:variable name="uuid">
+        <xsl:value-of select="@divesiteid"/>
+      </xsl:variable>
     <LOCATION>
-      <xsl:value-of select="location"/>
+      <xsl:value-of select="//site[@uuid = $uuid]/@name"/>
     </LOCATION>
     <WATERVIZIBILITY>
       <xsl:value-of select="@visibility"/>
@@ -182,10 +185,10 @@
       <xsl:value-of select="notes"/>
     </LOGNOTES>
     <LAT>
-      <xsl:value-of select="substring-before(location/@gps, ' ')"/>
+      <xsl:value-of select="substring-before(//site[@uuid = $uuid]/@gps, ' ')"/>
     </LAT>
     <LNG>
-      <xsl:value-of select="substring-after(location/@gps, ' ')"/>
+      <xsl:value-of select="substring-after(//site[@uuid = $uuid]/@gps, ' ')"/>
     </LNG>
     <MAXDEPTH>
       <xsl:value-of select="substring-before(node()/depth/@max, ' ')"/>
-- 
2.1.4



More information about the subsurface mailing list