Hi,<div><br></div><div>I need to compare one attribute from database table in "EXPRESSION" (under "LAYER") with six different values passed as Variable Substitution for coloring the layer.</div>
<div><br></div><div>I did added validation for those variables in the map file, but for some reason I am getting the below error.</div><div><br></div><div><b>msValidateParameter(): Regular expression error. Parameter pattern validation failed.</b></div>
<div><div><b>msEvalRegex(): Regular expression error. String failed expression test.</b></div><div><b>msValidateParameter(): Regular expression error. Parameter pattern validation failed.</b></div></div><div><b><br></b></div>
<div>Could anyone help me with where I am wrong? Below is the map file content for this layer. </div><div><br></div><div>All the six variables would be numbers (may be a decimal number), Is my regular expression correct? </div>
<div><br></div><div><div>WEB</div><div> VALIDATION</div><div> value_one "^[\d+(\.\d)]*$"</div><div> value_two "^[\d+(\.\d)]*$"</div><div> value_three "[^\d+(\.\d)]*$"</div>
<div> value_four "[^\d+(\.\d)]*$"</div><div> value_five "[^\d+(\.\d)]*$"</div><div> value_six "[^\d+(\.\d)]*$"</div><div> END</div><div>END</div></div><div><br clear="all">
<div><div>LAYER </div><div> NAME "state" </div><div> TYPE polygon</div><div> STATUS ON </div><div> CONNECTIONTYPE POSTGIS</div><div> CONNECTION "user=postgres password=****** dbname=shpdb host=localhost port=5432"</div>
<div> DATA "the_geom FROM (SELECT gid, the_geom, totpop1 FROM state_shape) AS SUBQUERY using unique gid"</div><div> PROCESSING "CLOSE_CONNECTION=DEFER"</div><div> CLASSITEM "totpop1"</div>
<div> OPACITY 100</div><div> CLASS </div><div><span style="white-space:pre-wrap"> </span> EXPRESSION ([TOTPOP1] >= %value_one% AND [TOTPOP1] < %value_two%)</div><div><span style="white-space:pre-wrap"> </span> STYLE </div>
<div><span style="white-space:pre-wrap"> </span> COLOR 255 108 118</div><div><span style="white-space:pre-wrap"> </span> OUTLINECOLOR 255 255 255</div><div><span style="white-space:pre-wrap"> </span> END </div>
<div> END</div><div> CLASS</div><div> EXPRESSION ([TOTPOP1] >= %value_two% AND [TOTPOP1] < %value_three%)</div><div><span style="white-space:pre-wrap"> </span> STYLE </div><div><span style="white-space:pre-wrap"> </span> COLOR 254 189 75</div>
<div><span style="white-space:pre-wrap"> </span> OUTLINECOLOR 255 255 255</div><div><span style="white-space:pre-wrap"> </span> END </div><div> END</div><div> CLASS<span style="white-space:pre-wrap"> </span></div>
<div><span style="white-space:pre-wrap"> </span> EXPRESSION ([TOTPOP1] >= %value_three% AND [TOTPOP1] < %value_four%)</div><div><span style="white-space:pre-wrap"> </span> STYLE </div>
<div><span style="white-space:pre-wrap"> </span> COLOR 254 247 46 </div><div><span style="white-space:pre-wrap"> </span> OUTLINECOLOR 255 255 255</div><div><span style="white-space:pre-wrap"> </span> END </div>
<div> END</div><div> CLASS<span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span> EXPRESSION ([TOTPOP1] >= %value_four% AND [TOTPOP1] < %value_five%)</div>
<div><span style="white-space:pre-wrap"> </span> STYLE </div><div><span style="white-space:pre-wrap"> </span> COLOR 39 251 114</div><div><span style="white-space:pre-wrap"> </span> OUTLINECOLOR 255 255 255</div>
<div><span style="white-space:pre-wrap"> </span> END </div><div> END</div><div> CLASS<span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span> EXPRESSION ([TOTPOP1] >= %value_five% AND [TOTPOP1] <= %value_six%)</div>
<div><span style="white-space:pre-wrap"> </span> STYLE </div><div><span style="white-space:pre-wrap"> </span> COLOR 108 111 205</div><div><span style="white-space:pre-wrap"> </span> OUTLINECOLOR 255 255 255</div>
<div><span style="white-space:pre-wrap"> </span> END </div><div> END</div><div>END</div></div>-- <br>Regards,<br>Prabu Raja<br><br>
</div>