aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-10-17 22:05:28 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-17 12:19:23 -0700
commitf771a94a853bfd08f91dfdd8048867ffc67481b6 (patch)
tree49b8943bacdf6afbba0adc483c4b55187ac4be9b
parent3ec687172096d9d47010fb843ce48cfaff5f8ba8 (diff)
downloadsubsurface-f771a94a853bfd08f91dfdd8048867ffc67481b6.tar.gz
Get information only from first line at each time
As some CSV log files seem to contain multiple sample lines for a single time, we'll just grab the first one of them to avoid duplicates. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--xslt/csv2xml.xslt9
1 files changed, 6 insertions, 3 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index f3ec101d4..f50457257 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -28,9 +28,12 @@
<xsl:template name="printLine">
<xsl:param name="line"/>
<xsl:param name="remaining"/>
- <xsl:call-template name="printFields">
- <xsl:with-param name="line" select="$line"/>
- </xsl:call-template>
+
+ <xsl:if test="substring-before($line, $fs) != substring-before(substring-before($remaining, $lf), $fs)">
+ <xsl:call-template name="printFields">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:if>
<xsl:if test="$remaining != ''">
<xsl:call-template name="printLine">
<xsl:with-param name="line" select="substring-before($remaining, $lf)"/>