# Styling by SLD according to multiple field

I have a shapefile which have two fields say it is "level" and "type".

Now we want to style the map according to the value of the level and type fields.

Generally we use something rule based symbol to style the layer like this:

rule
level=1
style....
level=2
style...


However once there are multiple fields to be filtered it may change to this:

rule
level=1 and type=1
style....
level=1 and type=2
style...
level=2 and type=1
style...
level=2 and type=2
style...
level=3 and type=1
style...


It seems like we have to specify all the possibility of the composition of different field. Think about if there are 10+ distinct values of each field, there will be 10*10*10 kinds of rules which will be a hard job.

How do you handle this?