summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-05-03 21:56:51 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-04 10:51:36 -0700
commitfe927139ecfd4270d478e3f9c96449456eb51551 (patch)
treed57c13944141a71ecf1208e72462ba143b671761 /xslt
parent6897c38fece18a366f9d7ffa4143356373cdad5d (diff)
downloadsubsurface-fe927139ecfd4270d478e3f9c96449456eb51551.tar.gz
Import UDDF location without GPS data
Fixes #376 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/uddf.xslt9
1 files changed, 7 insertions, 2 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index 567774cc0..81fb294d1 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -173,12 +173,17 @@
</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:choose>
+ <xsl:when 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>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="//u:divesite/u:site[@id=$ref]/u:name"/>
+ </xsl:otherwise>
+ </xsl:choose>
</location>
</xsl:if>
</xsl:for-each>