summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-04-29 18:24:38 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-29 22:02:50 -0700
commit4aa7b01059c01eb9ed1efd5edac93c6c08e07d6d (patch)
tree298edb46d22caf5bf33fd795a9553816cc8b9d90 /xslt
parent2c4b24112a0e92c1f961355ea2e2ae1fb8043938 (diff)
downloadsubsurface-4aa7b01059c01eb9ed1efd5edac93c6c08e07d6d.tar.gz
Properly identify siblings on UDDF export
UDDF export used all samples in the export when detecting previous sample. This resulted in a very slow processing as we had to go through massive amount of data for each event that's time was to be approximated. The detection of previous sample was also erroneous resulting in incorrect depth samples for the events in some occasions. This patch should address these issues. And along with patch that included pressure data on import this will fix the bug #499. Well, the performance after the patch is still not stellar, but still quite a difference with such a small change. The sample set of 8 dives (with one event each) takes now less than 5 seconds instead of the original 36 seconds (measured by doing the conversion with xsltproc). Fixes #499 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/uddf-export.xslt4
1 files changed, 2 insertions, 2 deletions
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
index e82b29df6..3ab59e705 100644
--- a/xslt/uddf-export.xslt
+++ b/xslt/uddf-export.xslt
@@ -197,7 +197,7 @@
<xsl:variable name="timefirst">
<xsl:call-template name="time2sec">
<xsl:with-param name="time">
- <xsl:value-of select="//sample[position() = $position]/@time"/>
+ <xsl:value-of select="../sample[position() = $position]/@time"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
@@ -225,7 +225,7 @@
<xsl:variable name="depthfirst">
<xsl:call-template name="depth2mm">
<xsl:with-param name="depth">
- <xsl:value-of select="//sample[position() = $position]/@depth"/>
+ <xsl:value-of select="../sample[position() = $position]/@depth"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>