[PATCH] Clean up MacDive location conversion
Miika Turkia
miika.turkia at gmail.com
Wed May 20 11:45:56 PDT 2015
We got additional slashes in front of the site if country and/or
location was missing.
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
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
More information about the subsurface
mailing list