[PATCH 1/7] Fix a bug that added 0, 0 as location on manual CSV import
Miika Turkia
miika.turkia at gmail.com
Sat Dec 20 11:23:29 PST 2014
The existence of location information was tested incorrectly resulting
in erroneously adding these fields if they were not present.
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
xslt/manualcsv2xml.xslt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt
index 1ad9651..58f04fc 100644
--- a/xslt/manualcsv2xml.xslt
+++ b/xslt/manualcsv2xml.xslt
@@ -166,9 +166,9 @@
<divecomputerid deviceid="ffffffff" model="csv" />
- <xsl:if test="$locationField != '' or $gpsField != ''">
+ <xsl:if test="$locationField >= 0 or $gpsField >= 0">
<location>
- <xsl:if test="$gpsField != ''">
+ <xsl:if test="$gpsField >= 0">
<xsl:attribute name="gps">
<xsl:call-template name="getFieldByIndex">
<xsl:with-param name="index" select="$gpsField"/>
@@ -176,7 +176,7 @@
</xsl:call-template>
</xsl:attribute>
</xsl:if>
- <xsl:if test="$locationField != ''">
+ <xsl:if test="$locationField >= 0">
<xsl:call-template name="getFieldByIndex">
<xsl:with-param name="index" select="$locationField"/>
<xsl:with-param name="line" select="$line"/>
--
1.9.1
More information about the subsurface
mailing list