diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2013-03-16 09:42:13 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-03-16 15:16:41 -0700 |
commit | 38d224a335cb9935d186b8b7ad0dc39c768e364f (patch) | |
tree | 678f2dff1047d2c1fd3191f7b6994275d4dda0c9 /xslt/divelogs.xslt | |
parent | fbb260aeb581b5f09a7ad439768a65c37856b77c (diff) | |
download | subsurface-38d224a335cb9935d186b8b7ad0dc39c768e364f.tar.gz |
Only print separator when really needed on import
The separator was printed if SITE had data, even if LOCATION was empty.
Now print the separator only if both of these contain data.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/divelogs.xslt')
-rw-r--r-- | xslt/divelogs.xslt | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xslt/divelogs.xslt b/xslt/divelogs.xslt index c0585a540..32a59c358 100644 --- a/xslt/divelogs.xslt +++ b/xslt/divelogs.xslt @@ -45,14 +45,8 @@ </depth> <location> <xsl:for-each select="LOCATION|SITE"> - <xsl:choose> - <xsl:when test="following-sibling::SITE[1] != ''"> - <xsl:value-of select="concat(., ' / ')"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="."/> - </xsl:otherwise> - </xsl:choose> + <xsl:value-of select="."/> + <xsl:if test=". != '' and following-sibling::*[1] != ''"> / </xsl:if> </xsl:for-each> </location> |