Hi Manog.
Unfortunately GetLegendGraphic doesn’t support dynamic symbolizers in ExternalGraphic hrefs.
The reason is quite simple: the legend builder doesn’t have access to the Feature data, so it wouldn’t be possible for it to get a concrete value for Ikon attribute to build an existing url for the image.
Your alternative SLD allows the legend to be drawn, because you are using static urls.
Maybe for dynamic symbolizers we should support pre-rendered images, as asked in http://jira.codehaus.org/browse/GEOS-3747.
Mauro Bartolomeoli
–
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it