Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-08-04 01:19:08 +02:00
commit 26cd31f060

View file

@ -30,15 +30,13 @@
<xsl:for-each select="//gx:Track"> <xsl:for-each select="//gx:Track">
<trk> <trk>
<trkseg> <trkseg>
<xsl:for-each select="kml:when"> <xsl:for-each select="gx:coord">
<!-- Timestamp --> <xsl:variable name="i" select="position()"/>
<xsl:variable name="ts" select="."/> <xsl:variable name="lonlat" select="."/>
<!-- Coordinates -->
<xsl:variable name="lonlat" select="./following-sibling::gx:coord"/>
<xsl:variable name="lon" select="substring-before($lonlat,' ')"/> <xsl:variable name="lon" select="substring-before($lonlat,' ')"/>
<xsl:variable name="latele" select="substring-after($lonlat,' ')"/> <xsl:variable name="latele" select="substring-after($lonlat,' ')"/>
<xsl:variable name="lat"> <xsl:variable name="lat">
<xsl:choose> <xsl:choose>
<xsl:when test="contains($latele,' ')"> <xsl:when test="contains($latele,' ')">
<xsl:value-of select="substring-before($latele,' ')"/> <xsl:value-of select="substring-before($latele,' ')"/>
</xsl:when> </xsl:when>
@ -46,10 +44,18 @@
<xsl:value-of select="$latele"/> <xsl:value-of select="$latele"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<trkpt lon="{$lon}" lat="{$lat}"> <trkpt lon="{$lon}" lat="{$lat}">
<time><xsl:value-of select="$ts"/></time> <xsl:choose>
</trkpt> <xsl:when test="contains($latele,' ')">
<ele> <xsl:value-of select="substring-after($latele,' ')"/></ele>
</xsl:when>
</xsl:choose>
<xsl:variable name="ts" select="../kml:when[$i]"/>
<xsl:if test="$ts">
<time><xsl:value-of select="$ts"/></time>
</xsl:if>
</trkpt>
</xsl:for-each> </xsl:for-each>
</trkseg> </trkseg>
</trk> </trk>