I am constantly wondering the weird and massively underdocumented syntax of custom rendering, and today I have yet again failed attempt to understand the logic behind it. Maybe someone could shed some light on it and if someone is able to make me understand I may try to write some documentation about it.
Today I have tried to create a rendering style to debug the map: show residentials with no name, show fixme tags, etc.
Again I had to realise that this XML isn't your everyday XML, for example the "documentation" suggested me that these are equivalent:
<line>
<switch>
<switch tag="highway" value="residential">
<case tag="name" value="">
<apply color="#e0ff0000" strokeWidth=":2"/>
</case>
</switch>
</switch>
</line>
<line>
<switch>
<switch tag="highway" value="residential">
<case tag="name" value=""/>
<apply color="#e0ff0000" strokeWidth=":2"/>
</switch>
</switch>
</line>
They apparently aren't: one changes every residential and the other changes none. I have tried to figure out when to use switch or case, when to put changed parameters as attributes or in separate apply tags, why to have an empty toplevel switch tag etc but I get really random results.
Apart from that I seem to be unable to define a case where it would tag highway=residential without name tags (or the other way around with name tags of any value, though this isn't what I need).
(As for testing I have seem to have lost the way to exit OsmAnd, and it seems not realoading once loaded style so I have to ask android to KILL osmand to be able to test the next change of rendering style. :-/)
Anyone have an idea how to render residentials with missing name tags red?