[Openstreetmap-dev] More on GPX schema

Immanuel Scholz immanuel.scholz at gmx.de
Fri Sep 23 08:11:03 BST 2005


Hi,

> > my point is just that predefined keys as part of the XML namespace 
> > are easier to handle

Well, I fail to see the difference in complexity writing a parser for

<property key="foot" value="yes" />
or
<foot>yes</foot>

If you using a sax-like state maching, in the first example your check
in startElement would be something like:

if (attr.getValue("key") == "foot") ...  or in the second case
if (elemName == "foot")

and if you write a dom-like parser, your check in your traversing loop
would be like:

if (element.getAttrValue("key") == "foot") ...  versus
if (element.getName() == "foot")


> A related point.. is it actually in OSM clients' interest for users be able to 
> permanently edit the names of keys? Might that cause problems, for example, 
> if a client application is expecting to read a key called "foot" and someone 
> changes it to "pedestrian", the client app would not be able to find the key?
> 
> Maybe it would make sense for key names to be editable only for a "consensus" 
> period after a new key is added to OSM, to allow people to agree on a name?


This all could be done via a protection mechanism like the wikipedia
protected pages. So there is no need to change the xml-schema, nor any
client, if you decide that a specific key is worth enough to have it not
changed.


Ciao, Imi.






More information about the dev mailing list