mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Support for new data format for MacDive
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4c588c1f00
commit
6cd71882f2
1 changed files with 54 additions and 25 deletions
|
@ -113,6 +113,33 @@
|
|||
<xsl:value-of select="sampleInterval"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="site/country|site/location|site/name|site/lat|site/lon">
|
||||
<location debug="true">
|
||||
<xsl:for-each select="site/country|site/location|site/name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="following-sibling::location[1] != ''">
|
||||
<xsl:value-of select="concat(., ' / ')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="following-sibling::name[1] != ''">
|
||||
<xsl:value-of select="concat(., ' / ')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</location>
|
||||
|
||||
<!-- This will discard GPS coordinates of 0 0 but I suppose that
|
||||
is better than all non-gps dives to be in that location -->
|
||||
<xsl:if test="site/lat != 0">
|
||||
<gps>
|
||||
<xsl:value-of select="concat(site/lat, ' ', site/lon)"/>
|
||||
</gps>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<location>
|
||||
<xsl:for-each select="country|location|site">
|
||||
<xsl:choose>
|
||||
|
@ -141,6 +168,8 @@
|
|||
<xsl:value-of select="concat(siteLat, ' ', siteLon)"/>
|
||||
</gps>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<notes>
|
||||
<xsl:value-of select="notes"/>
|
||||
|
|
Loading…
Reference in a new issue