<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/109377/">http://git.reviewboard.kde.org/r/109377/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 6th, 2013, 2:31 p.m. UTC, <b>Dennis Nienhüser</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Do you have a sample .gpx file to test with? When I tried to load one of mine with the namespace removed manually, Marble failed to load it even with the patch applied.
</pre>
</blockquote>
<p>On April 7th, 2013, 4:14 p.m. UTC, <b>Roman Karlstetter</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes you are right, it doesn't work for me either. So either I forgot something in my patch or I made some errors while testing it in the first place. I'll have a deeper look when I find the time.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This didn't work when I first tested it, don't ask me why I submitted this.
The problem is that the tag handlers are registered with a namespace, and as the document has no namespace, no tag is recognized (the document is completely parsed, but no information is retrieved from it). There are some possibilities:
- register the handlers with an empty namespace: this is ugly, as tags are not unique anymore and could not be registered because there is already an implementation for a tag (then wrong handlers might get called). No, we don't want to go this way.
- we don't parse files without namespace (they are in fact invalid). We should somehow tell the user that the file could not be loaded/parsed in this case.
- if no namespace is specified in the doc, we assume a default namespace (in this case e.g. http://www.topografix.com/GPX/1/0). Each GeoParser would provide this information in a new method defaultNamespace() (a default implementation returns an empty string, plugins that aren't changed behave the same way as they do now).
Any comments?</pre>
<br />
<p>- Roman</p>
<br />
<p>On April 6th, 2013, 2:37 p.m. UTC, Roman Karlstetter wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Marble and Dennis Nienhüser.</div>
<div>By Roman Karlstetter.</div>
<p style="color: grey;"><i>Updated April 6, 2013, 2:37 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Currently, when you try to load a track from a GPX-file with a missing namespace declaration, just nothing happens (file is not loaded and there is nothing indicating to the user that loading has failed). With this small patch, marble tries to parse a GPX file without a namespace declaration and prints a debug message.
Should there be a notification for the user when parsing (not just for GPX) fails? </pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=314482">314482</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/plugins/runner/gpx/GpxParser.cpp <span style="color: grey">(d1a32c2)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/109377/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>