gpx-builder
gpx-builder copied to clipboard
Support for additional namespaces
It's not clear to me whether the GPX metadata namespaces used by this library are extensible.
Can I:
- Add namespaces to the GPX header?
- Add properties which are not part of
gpxx?
For example, can I create something like:
<?xml version="1.0"?>
<gpx version="1.1" creator="OpenCPN"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd
http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www8.garmin.com/xmlschemas/GpxExtensionsv3.xsd"
xmlns:opencpn="http://www.opencpn.org">
<rte>
<name>Around Orcas</name>
<extensions>
<gpxx:DisplayColor>Transparent</gpxx:DisplayColor>
<opencpn:planned_speed>6.00</opencpn:planned_speed>
...
Note that a major gpx parser, togeojson, is just adding support for reading files with arbitrary namespaces and it would be awesome if gpx-builder had symmetrical support. Here's the relevant pull request: https://github.com/placemark/togeojson/pull/129