source: josm/trunk/data/validator/relation.mapcss@ 6550

Last change on this file since 6550 was 6538, checked in by simon04, 10 years ago

see #9414 - MapCSS-based tagchecker: provide {i.key}, {i.value}, {i.tag} variables to messages/fixes which refer to the corresponding match condition

File size: 1.5 KB
Line 
1/* relation types */
2
3relation[!type] {
4 throwError: tr("relation without type");
5 assertMatch: "relation name=Foo";
6 assertNoMatch: "relation type=route name=Foo";
7}
8
9/* from http://wiki.openstreetmap.org/wiki/Types_of_relation */
10/* see also #9071 */
11relation[type=route][!route],
12relation[type=route_master][!route_master],
13relation[type=restriction][!restriction],
14relation[type=boundary][!boundary],
15relation[type=site][!site],
16relation[type=public_transport][!public_transport],
17relation[type=waterway][!waterway],
18relation[type=enforcement][!enforcement] {
19 throwWarning: tr("{0} relation without {0} tag", "{1.key}");
20 assertMatch: "relation type=route";
21 assertNoMatch: "relation type=route route=train";
22 assertMatch: "relation type=route_master";
23 assertNoMatch: "relation type=route_master route_master=train";
24 assertMatch: "relation type=restriction";
25 assertNoMatch: "relation type=restriction restriction=no_left_turn";
26 assertMatch: "relation type=boundary";
27 assertNoMatch: "relation type=boundary boundary=administrative";
28 assertMatch: "relation type=site";
29 assertNoMatch: "relation type=site site=administrative";
30 assertMatch: "relation type=public_transport";
31 assertNoMatch: "relation type=public_transport public_transport=stop_area";
32 assertMatch: "relation type=waterway";
33 assertNoMatch: "relation type=waterway waterway=river";
34 assertMatch: "relation type=enforcement";
35 assertNoMatch: "relation type=enforcement enforcement=maxspeed";
36}
Note: See TracBrowser for help on using the repository browser.