Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why don't they update existing namespaces? (Groundspeak, Topografix...) #4

Open
wrygiel opened this issue Sep 17, 2017 · 4 comments
Open
Labels

Comments

@wrygiel
Copy link
Member

wrygiel commented Sep 17, 2017

Quotes from here and here:

If only new elements were added, why didn't Groundspeak simply add them as optional elements to the existing XML namespace?

I guess because (a) they didn't know better and (b) no GPX-reading application evaluates the XSDs. Developers just download sample GPX files, analyze them and parse them accordingly. I have parsed several XML file types in my applications, but I never cared about schema definitions.

Caring about schema definitions, and caring about XML namespaces, are two different things. They have defined their elements in a specific namespace, but then, released a new version of the schema, ordering all developers to move all elements to a different namespace, instead of extending the existing one. Why not simply update the previous XSD file? I don't understand this logic. We must be missing something...

I will start a separate thread for that. Perhaps one day, someone, will enlighten us :)

This was referenced Sep 17, 2017
@following5
Copy link
Contributor

following5 commented Sep 17, 2017

Why not simply update the previous XSD file? I don't understand this logic. We must be missing something...

Regarding GS 1.0 -> 1.0.1:

Maybe it's because the semantics of the attribute element has changed? The default value for the new "inc" attribute is 1. If a GS 1.0 parser reads a GS 1.0.1 GPX file, it will understand all attributes as inc-1-attributes, so it wrongly processes inc-0-attributes. E.g. it will undestand "no tree climbing" (id = 64, inc = 0) as "tree climbing" (id = 64, inc = 1).

@wrygiel
Copy link
Member Author

wrygiel commented Sep 17, 2017

Maybe it's because the semantics of the attribute element has changed?

Perhaps. I wonder why they didn't make it 100% backward-compatible. For example, they might have added <negative-attribute>, and include the <attribute> elements only for positive attribute in their GPX files. But instead, they chose to extend the existing one, and change the namespace. Seems sloppy.

One might suspect that perhaps GS 1.0.1 was introduced soon after GS 1.0 and they thought no one will care. But then, we change the namespace? That kind of huge change is hard to miss. So this theory doesn't hold either.

@following5
Copy link
Contributor

following5 commented Sep 17, 2017

Yes, they obviously made some mistakes. See also the bug in 1.0 and 1.0.1 versions, which allowed an unlimited number of attributes, logs and travelbugs elements.

@following5
Copy link
Contributor

... and they had to add this GPX version switch to their user profile settings because they failed in making it backward compatible. Shit happens. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants