Author Topic: Theme rule set rendering  (Read 196 times)

Offline Martin Holý

  • Newbie
  • *
  • Posts: 1
    • View Profile
Theme rule set rendering
« on: August 18, 2020, 14:52:05 »
Hello I have trouble with this rule set.

Code: [Select]
<rule e="way" k="landuse" v="allotments|meadow|grass|orchard|vineyard">
  <area fill="#DDE8BB" />

  <rule e="way" k="landuse" v="allotments|orchard|vineyard">
    <area stroke="#C2D881" stroke-width="0.5" />
  <rule e="way" k="*" v="*" zoom-min="14">
    <rule e="way" k="landuse" v="orchard">
      <area symbol-scaling="size" src="file:/patterns/Landuse-Orchard.png" />
    <rule e="way" k="landuse" v="vineyard">
      <area symbol-scaling="size" src="file:/patterns/Landuse-Vineyard.png" />

All values "allotments|meadow|grass|orchard|vineyard" end up rendered as
Code: [Select]
<area fill="#DDE8BB" stroke="#C2D881" stroke-width="0.5" symbol-scaling="size" src="file:/patterns/Landuse-Orchard.png" src="file:/patterns/Landuse-Orchard.png" />
It works if I split the rules but can it be done with nested rules somehow like this?

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 829
  • Thanked: 121 times
    • View Profile
  • Device: MotoG
Re: Theme rule set rendering
« Reply #1 on: August 18, 2020, 15:46:16 »
Nested rules like that do not work as expected, as you have found! You can't test for A|B and then nest an almost identical test for A. It appears that the previous test is cached in some way.

Sent from my moto g(6) plus using Tapatalk