We got additional slashes in front of the site if country and/or
location was missing.

Signed-off-by: Miika Turkia <[email protected]>
---
 xslt/MacDive.xslt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xslt/MacDive.xslt b/xslt/MacDive.xslt
index 628c67e..59b05c3 100644
--- a/xslt/MacDive.xslt
+++ b/xslt/MacDive.xslt
@@ -89,10 +89,10 @@
           <location debug="true">
             <xsl:for-each select="site/country|site/location|site/name">
               <xsl:choose>
-                <xsl:when test="following-sibling::location[1] != ''">
+                <xsl:when test="following-sibling::location[1] != '' and . != 
''">
                   <xsl:value-of select="concat(., ' / ')"/>
                 </xsl:when>
-                <xsl:when test="following-sibling::name[1] != ''">
+                <xsl:when test="following-sibling::name[1] != '' and . != ''">
                   <xsl:value-of select="concat(., ' / ')"/>
                 </xsl:when>
                 <xsl:otherwise>
@@ -114,10 +114,10 @@
           <location>
             <xsl:for-each select="country|location|site">
               <xsl:choose>
-                <xsl:when test="following-sibling::location[1] != ''">
+                <xsl:when test="following-sibling::location[1] != '' and . != 
''">
                   <xsl:value-of select="concat(., ' / ')"/>
                 </xsl:when>
-                <xsl:when test="following-sibling::site[1] != ''">
+                <xsl:when test="following-sibling::site[1] != '' and . != ''">
                   <xsl:value-of select="concat(., ' / ')"/>
                 </xsl:when>
                 <xsl:otherwise>
-- 
2.1.4

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to