[Tagging] Removing name_1 and alt_name_1 from Wiki

Colin Smale colin.smale at xs4all.nl
Tue Jan 19 18:25:38 UTC 2016


So how do you indicate a missing/empty value in the middle of the list?
Does "a;;b" mean a single value of "a;b" or does it mean three values
"a", "" and "b"?

The "lanes" tag family uses a different delimiter ("|"), sometimes
together with a semicolon to make a kind of 2-d array. A double pipe
("||") indicates a missing value there. Wouldn't it be nice if we were
consistent? 

FWIW a better way would be to escape the special character by prefixing
it with a backslash ("\"). If you need a backslash in the data you
escape it in the same way - so you get a double backslash. So the
example above would be "a\;b" for a single value, or "a;;b" for three
values (of which the second is missing or empty). This is the mechanism
adopted by just about all the modern programming languages in the world,
so there must be something in it.... 

Whatever syntax we use, it needs to be unambiguous, or we will run into
problems sooner or later. 

//colin 

On 2016-01-19 19:02, Hakuch wrote:

> On 10.01.2016 22:29, moltonel 3x Combo wrote: 
> 
>> Actually to my human eyes, both semicolons and suffixes are equally
>> ugly (but pragmatic). It's for processing that suffixes are supperior:
>> * Spliting by semicolons (no regexp needed :p) is easy but naive,
>> because semicolons are sometimes part of the actual value.
>> * One workaround is to use some kind of escape character, but this is
>> an impementation/spec minefield that we'll never get right.
>> * Another is to maintain a whitelist of tags that can be split by
>> semicolon, but it's extra work and everybody'll have a different list.
> 
> actually, I just found that we have a solution for this in Wiki:
> 
> http://wiki.openstreetmap.org/wiki/Semi-colon_value_separator#Escaping_with_.27.3B.3B.27
> 
> It might not be used by that much developers, but they can find it in
> Wiki if they want to care for their data 
> _______________________________________________
> Tagging mailing list
> Tagging at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/tagging
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tagging/attachments/20160119/3ebeee2a/attachment.html>


More information about the Tagging mailing list