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

Last change on this file since 7264 was 6641, checked in by simon04, 10 years ago

Validator: type=site without site is perfectly valid (side is optional and seldom used)

File size: 1.4 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=public_transport][!public_transport],
16relation[type=waterway][!waterway],
17relation[type=enforcement][!enforcement] {
18 throwWarning: tr("{0} relation without {0} tag", "{1.key}");
19 assertMatch: "relation type=route";
20 assertNoMatch: "relation type=route route=train";
21 assertMatch: "relation type=route_master";
22 assertNoMatch: "relation type=route_master route_master=train";
23 assertMatch: "relation type=restriction";
24 assertNoMatch: "relation type=restriction restriction=no_left_turn";
25 assertMatch: "relation type=boundary";
26 assertNoMatch: "relation type=boundary boundary=administrative";
27 assertNoMatch: "relation type=site site=administrative";
28 assertMatch: "relation type=public_transport";
29 assertNoMatch: "relation type=public_transport public_transport=stop_area";
30 assertMatch: "relation type=waterway";
31 assertNoMatch: "relation type=waterway waterway=river";
32 assertMatch: "relation type=enforcement";
33 assertNoMatch: "relation type=enforcement enforcement=maxspeed";
34}
Note: See TracBrowser for help on using the repository browser.