summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-12-13 22:00:35 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-13 13:18:11 -0800
commit1c7efda5e17a3d9e439680644a37ba9c483ed011 (patch)
tree8784e84c2c973e0a08d5238ad807a704bbbb3d6c
parent0a533d9dc24d9bc6c0c20eca94bfd3a0b0c8de55 (diff)
downloadsubsurface-1c7efda5e17a3d9e439680644a37ba9c483ed011.tar.gz
Include dive location on uddf import
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--xslt/uddf.xslt16
1 files changed, 16 insertions, 0 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index b3988f439..d941d4f82 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -164,6 +164,22 @@
</location>
</xsl:if>
+ <xsl:for-each select="u:informationbeforedive/u:link">
+ <xsl:variable name="ref">
+ <xsl:value-of select="@ref"/>
+ </xsl:variable>
+ <xsl:if test="//u:divesite/u:site[@id = $ref]/u:name">
+ <location>
+ <xsl:if test="//u:divesite/u:site[@id=$ref]/u:geography/u:longitude != ''">
+ <xsl:attribute name="gps">
+ <xsl:value-of select="concat(//u:divesite/u:site[@id=$ref]/u:geography/u:latitude, ' ', //u:divesite/u:site[@id=$ref]/u:geography/u:longitude)"/>
+ </xsl:attribute>
+ <xsl:value-of select="//u:divesite/u:site[@id=$ref]/u:name"/>
+ </xsl:if>
+ </location>
+ </xsl:if>
+ </xsl:for-each>
+
<xsl:if test="buddy_ref/@ref|informationbeforedive/buddy_ref/@ref != ''">
<buddy>
<xsl:variable name="ref">