MapCSS/validation does not behave as expected

Hi,
when applying this as vailidation I expected to have a match for this relation: Relation: 14956019 | OpenStreetMap.
Mapcss is:
relation[“network:type”=basic_network] [role=forward]way {
throwWarning: tr(“forward ways in relation”);
}
If I drop [role=forward] I have a match, but with it, there is a fail.

According to MapCSS/0.2 - OpenStreetMap Wiki section “Combining selectors” it should work.

When combining selectors like this, pseudo-tags are added to elements to allow you to access extra data. Here the role pseudo tag is added to the way object to indicate its role within the parent relation:

relation[type=route] way[role=proposed] /* Matches ways within a relation with type=route set, whose role is set to proposed */

Do I understand something wrong?
Cheers, JensUwe

2 posts - 2 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/mapcss-validation-does-not-behave-as-expected/106474