Skip to content
All gists
Back to GitHub
Sign in
Sign up
Sign in
Sign up
{{ message }}
Instantly share code, notes, and snippets.
Jakuje
/
gpx2navit.xsl
Last active
Aug 29, 2015
Star
0
Fork
0
Star
Code
Revisions
2
Embed
What would you like to do?
Embed
Embed this gist in your website.
Share
Copy sharable link for this gist.
Clone via HTTPS
Clone with Git or checkout with SVN using the repository’s web address.
Learn more about clone URLs
Download ZIP
Simple transformation for GPX files into files readable by Navit mobile navigation (with specialization for Geocaching)
Raw
gpx2navit.xsl
<
xsl
:
stylesheet
version
=
"
1.0
"
xmlns
:
xsl
=
"
http://www.w3.org/1999/XSL/Transform
"
xmlns
:
g
=
"
http://www.topografix.com/GPX/1/0
"
>
<
xsl
:
output
method
=
"
text
"
/>
<
xsl
:
template
match
=
"
g:gpx
"
>
<
xsl
:
for-each
select
=
"
g:wpt
"
>
<
xsl
:
choose
>
<
xsl
:
when
test
=
"
g:type = 'Waypoint|Parking Area'
"
>
<
xsl
:
text
>type=poi_car_parking label="</
xsl
:
text
>
</
xsl
:
when
>
<
xsl
:
when
test
=
"
starts-with(g:type, 'Geocache')
"
>
<
xsl
:
text
>type=poi_attraction label="</
xsl
:
text
>
</
xsl
:
when
>
<
xsl
:
otherwise
>
<
xsl
:
text
>type=poi_other label="</
xsl
:
text
>
</
xsl
:
otherwise
>
</
xsl
:
choose
>
<
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
:
text
>"
</
xsl
:
text
>
<
xsl
:
value-of
select
=
"
@lon
"
/>
<
xsl
:
text
> </
xsl
:
text
>
<
xsl
:
value-of
select
=
"
@lat
"
/>
<
xsl
:
text
>
</
xsl
:
text
>
</
xsl
:
for-each
>
</
xsl
:
template
>
</
xsl
:
stylesheet
>
Sign up for free
to join this conversation on GitHub
. Already have an account?
Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.