aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/uddf-export.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-03-10 07:21:34 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-13 08:31:30 -0700
commit6bcfb033eee341351366129df2c61fff4bc4b71b (patch)
tree74368fa671fd95e1b833565d228118b9fbc15df6 /xslt/uddf-export.xslt
parentc8df5625d4ed8fd687a64a5c4f12480612f84982 (diff)
downloadsubsurface-6bcfb033eee341351366129df2c61fff4bc4b71b.tar.gz
UDDF export: fix dive site support
We need to match the divesites to suppress extra output that breaks the XML. This is because the divesites are actually gathered by calling a template. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/uddf-export.xslt')
-rw-r--r--xslt/uddf-export.xslt9
1 files changed, 8 insertions, 1 deletions
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
index cb6a66f98..42dbbf0b9 100644
--- a/xslt/uddf-export.xslt
+++ b/xslt/uddf-export.xslt
@@ -38,6 +38,7 @@
<xsl:template match="/divelog/settings"/>
+ <xsl:template match="/divelog/divesites"/>
<xsl:template match="/divelog/dives">
<uddf version="3.2.0" xmlns="http://www.streit.cc/uddf/3.2/">
@@ -121,7 +122,6 @@
</diver>
<divesite>
-
<!-- There must be at least one divebase. Subsurface doesn't track this as a concept, so just assign them all to a single divebase. -->
<divebase id="allbase">
<name>Subsurface Divebase</name>
@@ -235,6 +235,13 @@
<xsl:value-of select="substring-after(@gps, ' ')"/>
</longitude>
</geography>
+ <xsl:if test="notes != ''">
+ <sitedata>
+ <notes>
+ <xsl:value-of select="notes"/>
+ </notes>
+ </sitedata>
+ </xsl:if>
</site>
</xsl:template>