aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2021-02-16 18:31:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-17 07:04:25 -0800
commit2936aa6aa0b76dce666f3d6c9f9f628d4f6b910a (patch)
tree0f720025d8753d8b09c3433bb8baa2e82abcaf6f /xslt
parent5a8d7617ce3d1b54f22a0438f593e844757ecc46 (diff)
downloadsubsurface-2936aa6aa0b76dce666f3d6c9f9f628d4f6b910a.tar.gz
Use country for divelogs.de export
This will use only the country name for the location field in divelogs.de export. The old version concatenated all the fields together. This is inline with Rainer's new import functionality. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/divelogs-export.xslt22
1 files changed, 11 insertions, 11 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt
index eaa1c510c..1bcf6e057 100644
--- a/xslt/divelogs-export.xslt
+++ b/xslt/divelogs-export.xslt
@@ -42,6 +42,17 @@
<xsl:value-of select="//site[@uuid = $uuid]/@name"/>
</xsl:variable>
<xsl:choose>
+ <xsl:when test="/divelog/divesites/site[@uuid = $uuid]/geo/@value != ''">
+ <LOCATION>
+ <xsl:for-each select="/divelog/divesites/site[@uuid = $uuid]/geo/@value">
+ <xsl:if test="position() != 1"> / </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </LOCATION>
+ <SITE>
+ <xsl:value-of select="$location"/>
+ </SITE>
+ </xsl:when>
<xsl:when test="contains($location, '/')">
<xsl:variable name="site">
<xsl:call-template name="basename">
@@ -56,17 +67,6 @@
</LOCATION>
</xsl:when>
<xsl:otherwise>
- <xsl:if test="/divelog/divesites/site[@uuid = $uuid]/geo/@value != ''">
- <LOCATION>
- <xsl:for-each select="/divelog/divesites/site[@uuid = $uuid]/geo/@value">
- <xsl:if test="position() != 1"> / </xsl:if>
- <xsl:value-of select="."/>
- </xsl:for-each>
- </LOCATION>
- </xsl:if>
- <SITE>
- <xsl:value-of select="$location"/>
- </SITE>
</xsl:otherwise>
</xsl:choose>