summaryrefslogtreecommitdiffstats
path: root/xslt/uddf-export.xslt
diff options
context:
space:
mode:
authorGravatar Martin Long <martin@longhome.co.uk>2014-12-13 00:34:37 +0000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-12 18:26:56 -0800
commitcbb613bcde609abbcead492e02afc7993d769015 (patch)
treea9f0a99ccbfe525db1c0b6c6885bb9ae374d3faa /xslt/uddf-export.xslt
parentc043d02f26bcbfb25179858547794dbced6eafc9 (diff)
downloadsubsurface-cbb613bcde609abbcead492e02afc7993d769015.tar.gz
Fix divecomputer part of UDDF export
XPath was incorrect for parsing divecomputers into the equipment section, meaning they dont get inserted. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/uddf-export.xslt')
-rw-r--r--xslt/uddf-export.xslt3
1 files changed, 2 insertions, 1 deletions
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
index 66220a77e..699f7b76e 100644
--- a/xslt/uddf-export.xslt
+++ b/xslt/uddf-export.xslt
@@ -6,6 +6,7 @@
<xsl:key name="gases" match="cylinder" use="concat(substring-before(@o2, '.'), '/', substring-before(@he, '.'))" />
<xsl:key name="images" match="picture" use="concat(../../dive/@number|../dive/@number, ':', @filename, '@', @offset)" />
+ <xsl:key name="divecomputer" match="divecomputer" use="@deviceid" />
<!-- This needs to be set at this top level so that it is avialable in both the buddies and profiledata sections-->
<xsl:variable name="buddies">
@@ -52,7 +53,7 @@
<diver>
<owner id="owner">
<equipment>
- <xsl:for-each select="/divelog/settings/divecomputerid">
+ <xsl:for-each select="//dive/divecomputer[generate-id() = generate-id(key('divecomputer', @deviceid)[1])]">
<divecomputer id="{./@deviceid}">
<name>
<xsl:choose>