Include dive location on uddf import

Adjust to UDDF 3.2 specification

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-12-13 22:00:35 +02:00 committed by Dirk Hohndel
parent 0a533d9dc2
commit 1c7efda5e1

View file

@ -164,6 +164,22 @@
</location>
</xsl:if>
<xsl:for-each select="u:informationbeforedive/u:link">
<xsl:variable name="ref">
<xsl:value-of select="@ref"/>
</xsl:variable>
<xsl:if test="//u:divesite/u:site[@id = $ref]/u:name">
<location>
<xsl:if test="//u:divesite/u:site[@id=$ref]/u:geography/u:longitude != ''">
<xsl:attribute name="gps">
<xsl:value-of select="concat(//u:divesite/u:site[@id=$ref]/u:geography/u:latitude, ' ', //u:divesite/u:site[@id=$ref]/u:geography/u:longitude)"/>
</xsl:attribute>
<xsl:value-of select="//u:divesite/u:site[@id=$ref]/u:name"/>
</xsl:if>
</location>
</xsl:if>
</xsl:for-each>
<xsl:if test="buddy_ref/@ref|informationbeforedive/buddy_ref/@ref != ''">
<buddy>
<xsl:variable name="ref">