﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23229	JOSM-mapcss Limited Parent - Child selectors for nodes with OSM hierarchy relation, way, node	pierzen	pierzen	"JOSM-mapcss parent-child selectors could be enhanced to offer more possibilities to select/render nodes

With MapCSS, we can use a child selector which matches only if both the parent and the child object match. 
- relation[type=route][route=foot] > way {...}
- way[natural] > node {...}

But there are restrictions that limit working with the OSM hierarchy Relation - Ways - Nodes.
 with selectors that. It is not possible, for example, to select nodes for ways that are part of a [natural=water] relation if we define a selector to set a class. Similarly, it is not possible to create a selector for a node that is child of both a [natural=water] relation and a waterway way.

**Examples**
    Nodes from ways part of a relation not selected
    - relation[type=mutlipolygon][natural=water] > way {set .natural_relation;}
    > way.natural_relation > node {...} selects no node

    Nodes from a way.class are not selected    
    - way[place=islet], way[place=island]  {set .isl;}
    > way.isl > node {...} selects no node
    
==== What steps will reproduce the problem?
1. open file natural-way-and-relation.osm
2. Press F12 (Preference), select Mappaint button on the left, Select the + Button on the right to Add as active style the attached mapcss style natural_way_node_childs_selectors.mapcss

==== What is the expected result?
1. Selection of way[natural], ways are rendered with casing-color:green
2. Selection of ways from a relation[type=multipolygon][natural=water], ways are rendered with color:red. 
3. Selection of nodes from these ways, nodes are rendered with symbol-stroke-color:red. 

==== What happens instead?
Trying to select both ways and nodes from a relation, ways are selected and colored appropriately but selector for nodes from the ways do not select and color the nodes part of these ways.

Trying to select both ways and nodes from a relation[type=multipolygon][natural=water], ways are rendered and colored as expected but it seems that they are processed as area. Node Child selectors from **way.class > node** do not select nodes and render them. 

==== Please provide any additional information below. 
**Reproduce the problem**
Load in JOSM the OSM file natural-way-and-relation.osm and the MAPCSS style
natural_way_node_childs_selectors.mapcss

[[Image(natural_way_node_childs_selectors_reproduce_problem.png)]]

**Expected result**

[[Image(natural_way_node_childs_selectors_expected_results.png)]]
"	enhancement	needinfo	normal		Core			mapcss parent child selector	
