Bug 251676 - GPX output of Marble's routing engine is apparently not valid
Summary: GPX output of Marble's routing engine is apparently not valid
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-18 17:44 UTC by Felix Schweighofer
Modified: 2010-09-26 11:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.10.2 / KDE 4.5.2


Attachments
The adapted and valid GPX file. (10.11 KB, application/xml)
2010-09-18 17:44 UTC, Felix Schweighofer
Details
The GPX file created by marble that fails to validate (9.93 KB, application/xml)
2010-09-18 17:46 UTC, Felix Schweighofer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Schweighofer 2010-09-18 17:44:08 UTC
Created attachment 51787 [details]
The adapted and valid GPX file.

Version:           unspecified (using KDE 4.5.1) 
OS:                Linux

When I use the routing function in Marble, export the route as GPX and check the resulting file for validity, I get some error messages for the following reasons:

#1: It seems that the element <rte> (route containing points with turn instructions) has to stand before the element <trk> (track witch is used to show the route as a line)

#2: The elements of type <rtept> are not correct GPX: <rtept [coordinates]>[instruction]</rtept> should be <rtept [coordinates]><name>[instruction]</name></rtept> instead.

Reproducible: Always

Steps to Reproduce:
#1: Export a route as GPX

#2: Validate the GPX file (e.g. xmllint --noout --schema http://www.topografix.com/GPX/1/1/gpx.xsd [file]) -> returns something like "element rte: Schemas validity error : Element '[...]rte': This element is not expected."

#3: Open the file in a text editor and move everything from <rte> to </rte> to a place in between </metadata> and <trk> and save.

#4: Repeat step #2 -> returns an error message like "element rtept: Schemas validity error : Element '[...]rtept': Character content [...] is not allowed [...] content type is 'element-only'"

#5: Open the file in a text editor again and surround all the instructions with <name> and </name>

#6: Repeat step #2 -> The file validates

Actual Results:  
See above

Expected Results:  
See above
Comment 1 Felix Schweighofer 2010-09-18 17:46:09 UTC
Created attachment 51788 [details]
The GPX file created by marble that fails to validate
Comment 2 Dennis Nienhüser 2010-09-26 10:10:26 UTC
SVN commit 1179736 by nienhueser:

Write xml that validates against http://www.topografix.com/GPX/1/1/gpx.xsd
CCBUG: 251676

 M  +12 -13    RoutingModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1179736
Comment 3 Dennis Nienhüser 2010-09-26 10:12:00 UTC
Thanks for the detailed bugreport, that made it easy to fix. I'll backport it later.
Comment 4 Dennis Nienhüser 2010-09-26 10:55:07 UTC
SVN commit 1179820 by nienhueser:

Write xml that validates against http://www.topografix.com/GPX/1/1/gpx.xsd
BUG: 251676
Backport of commit 1179736.


 M  +12 -13    RoutingModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1179820
Comment 5 Felix Schweighofer 2010-09-26 11:35:31 UTC
Thanks a lot for fixing this! :)