mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
UDDF export: adapt to new dive site management
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1cada7847e
commit
c8e542e5d3
1 changed files with 26 additions and 31 deletions
|
@ -127,7 +127,7 @@
|
||||||
<name>Subsurface Divebase</name>
|
<name>Subsurface Divebase</name>
|
||||||
</divebase>
|
</divebase>
|
||||||
|
|
||||||
<xsl:apply-templates select="//location"/>
|
<xsl:apply-templates select="//site" mode="called"/>
|
||||||
</divesite>
|
</divesite>
|
||||||
|
|
||||||
<!-- Define all the unique gases found in the dive log -->
|
<!-- Define all the unique gases found in the dive log -->
|
||||||
|
@ -216,19 +216,17 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:key name="location" match="location" use="./@gps"/>
|
<xsl:template match="site" mode="called">
|
||||||
<xsl:template match="location">
|
|
||||||
<xsl:if test="generate-id() = generate-id(key('location', normalize-space(./@gps)))">
|
|
||||||
<site xmlns="http://www.streit.cc/uddf/3.2/">
|
<site xmlns="http://www.streit.cc/uddf/3.2/">
|
||||||
<xsl:attribute name="id">
|
<xsl:attribute name="id">
|
||||||
<xsl:value-of select="generate-id()"/>
|
<xsl:value-of select="@uuid"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<name>
|
<name>
|
||||||
<xsl:value-of select="."/>
|
<xsl:value-of select="@name"/>
|
||||||
</name>
|
</name>
|
||||||
<geography>
|
<geography>
|
||||||
<location>
|
<location>
|
||||||
<xsl:value-of select="."/>
|
<xsl:value-of select="@name"/>
|
||||||
</location>
|
</location>
|
||||||
<latitude>
|
<latitude>
|
||||||
<xsl:value-of select="substring-before(@gps, ' ')"/>
|
<xsl:value-of select="substring-before(@gps, ' ')"/>
|
||||||
|
@ -238,7 +236,6 @@
|
||||||
</longitude>
|
</longitude>
|
||||||
</geography>
|
</geography>
|
||||||
</site>
|
</site>
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="dive">
|
<xsl:template match="dive">
|
||||||
|
@ -261,13 +258,11 @@
|
||||||
</link>
|
</link>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
<xsl:for-each select="location">
|
|
||||||
<link>
|
<link>
|
||||||
<xsl:attribute name="ref">
|
<xsl:attribute name="ref">
|
||||||
<xsl:value-of select="generate-id(key('location',normalize-space(./@gps)))"/>
|
<xsl:value-of select="@divesiteid"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</link>
|
</link>
|
||||||
</xsl:for-each>
|
|
||||||
<divenumber>
|
<divenumber>
|
||||||
<xsl:value-of select="./@number"/>
|
<xsl:value-of select="./@number"/>
|
||||||
</divenumber>
|
</divenumber>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue