Re: my previous message on supposed generateSLD bug... That's it - spaces between the operators ! this works: $clObj2->setExpression('(['.$sp.']> 20 And ['.$sp.']<= 40)'); while this didn't: $clObj2->setExpression('(['.$sp.']>20 And ['.$sp.']<=40)');