Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:17
What would you like to do?
Simple transformation for GPX files into files readable by Navit mobile navigation (with specialization for Geocaching)
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:g="">
<xsl:output method="text"/>
<xsl:template match="g:gpx">
<xsl:for-each select="g:wpt">
<xsl:when test="g:type = 'Waypoint|Parking Area'">
<xsl:text>type=poi_car_parking label="</xsl:text>
<xsl:when test="starts-with(g:type, 'Geocache')">
<xsl:text>type=poi_attraction label="</xsl:text>
<xsl:text>type=poi_other label="</xsl:text>
<xsl:value-of select="g:name"/>
<xsl:text>" description="</xsl:text>
<xsl:value-of select="g:desc"/>
<xsl:text>" gc_type="</xsl:text>
<xsl:value-of select="g:type"/>
<xsl:value-of select="@lon"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@lat"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment