Hi Johannes,

Thanks for the info, please find my comments inline.

2013/11/3 Johannes Rohr <jor...@gmail.com>:
> On Do, Okt 31, 2013 at 12:38:13 +0100, David García Granda wrote:
>> Hi,
>>
>> Pytrainer tries to validate every xml document before import and
>> unfortunately xml 1.0 is not supported. Some questions trying to find
>> root cause:
>>
>> 1.- Does gpx file validate?
>>
>> $ xmllint --noout --schema <schema_involved> <gpx_file>
>
> Here is what happens:
>
> [..]
>
> 2013-10-26_14-05-38.gpx:25889: element speed: Schemas validity error :
> Element '{http://www.topografix.com/GPX/1/1}speed': This element is not
> expected. Expected is ( ##other{http://www.topografix.com/GPX/1/1}* ).
> 2013-10-26_14-05-38.gpx:25896: element speed: Schemas validity error :
> Element '{http://www.topografix.com/GPX/1/1}speed': This element is not
> expected. Expected is ( ##other{http://www.topografix.com/GPX/1/1}* ).
> 2013-10-26_14-05-38.gpx fails to validate
> jr@Erwin:~/ownCloud/osmtracker$
>
> Obviously, the offending part is the "speed" element. Here is there
> corresponding code in the xml file:
>
>                         <trkpt lat="52.39175298" lon="13.13240081">
>                                 <ele>79.4000015258789</ele>
>                                 <time>2013-10-26T12:05:50Z</time>
>                                 <extensions>
>                                         <speed>1.25</speed>
>                                 </extensions>
>                         </trkpt>
>
>
> Is this an incorrect whay of recording the speed?
>
> Here is the header of the GPX file:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <gpx xmlns="http://www.topografix.com/GPX/1/1"; version="1.1"
> creator="OSMTracker for Android™ -
> http://osmtracker-android.googlecode.com/";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation
> ="http://www.topografix.com/GPX/1/1
> http://www.topografix.com/GPX/1/1/gpx.xsd ">

It seems that despite valid xml format (syntax), gpx file does not
valid provided schemas.

According to 1.1 gpx schema, you can add extend GPX by adding your own
elements from another schema in "extensions" (see
http://www.topografix.com/GPX/1/1/#type_extensionsType), but we miss
the definition of the element provided. For example, pytrainer adds
heartrate data using this feature:

<trkpt lat="43.5407522" lon="-5.6508772">
    <ele>14.4000000</ele>
    <time>2013-07-17T07:53:19Z</time>
    <extensions>
        <gpxdata:hr>101</gpxdata:hr>
    </extensions>
</trkpt>

>> 2.- Did you Johannes change some packages on your local installation
>> in last weeks?
>
> I am using Debian Testing, so the system keeps changing all the time.

No worries, it was just to discard other root sources, but I think we
have already found it.

>> 3.- Are you aware of any changes of mentioned app (OSM Tracker)?. I
>> know few people who got invalid exports from Garmin Connect some days
>> ago :|
>
> According to the changelog at
> https://code.google.com/p/osmtracker-android/wiki/Changelog
>
> v0.6.5: Export speed information in GPX thanks to andyhelp.
>
> Is this "extensions" element something that could be accommodated by
> pytrainer, or is it invalid xml?

Although I am not an expert, I still think is a good idea to validate
data upfront and from my point of view the issue is on the OSMTracker
guys who should provide a valid gpx file.

Best regards,

David


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to