[Geoserver-users] Dynamic ExternalGraphic icons from Attribute Properties

(from Mike Frumin, trouble getting through)

A while back (http://www.nabble.com/Dynamic-Colors%2C-from-Attributes-Propreties-tf3254992.html#a9048975) I asked about passing thru parameters from the raw (i.e. postgis) data into the SLD rendering. The example being if I stored a color for each feature in the DB, could that color be called upon in the SLD. The answer was yes, as such:

<PolygonSymbolizer><Fill>
               <CssParameter name="fill"><ogc:PropertyName>color</ogc:PropertyName></CssParameter>
</Fill></PolygonSymbolizer>

But now I'm getting even spicier. I am generating fancier data, in this case lets say some pie charts or sparkline graphs, for each of many Point features, each of which is named according to the 'id' column of the feature in the DB. I should be able to do something like this to dynamically pull in the different graphs as ExternalGraphic icons, but it certainly doesn't work:

     <PointSymbolizer>
         <Graphic>
             <ExternalGraphic>
                 <OnlineResource
                     xmlns:xlink="http://www.w3.org/1999/xlink&quot;
                     xlink:type="simple"
xlink:href="http://example.com/sparklies/&lt;ogc:PropertyName&gt;id&lt;/ogc:PropertyName&gt;\.png&quot;/&gt;
                 <Format>image/png</Format>
             </ExternalGraphic>
        </Graphic>
     </PointSymbolizer>

the error I get (in the spanky new GeoServer inline SLD editor) is:
INVALID XML: The value of attribute "xlink:href" associated with an element type "OnlineResource" must not contain the '<' character.

Now of course this makes sense from an XML formatting standpoint, but I think there should be some way around it, in order to increase the power of GeoServer for doing real good GIS and mapping. Please don't tell me to use OpenLayers and make a WFS that uses JavaScript to pull in the icons. It's a total pain (tho I may very well do it), but also then prohibits you from automatically rendering a given map w/out human intervention.

more recently, I tried putting everything up through:
<PointSymbolizer>
    <ogc:PropertyName>resource</ogc:PropertyName>
</PointSymbolizer>
but none of it gets passed the SLD validation (whereas using the PropertyName inside other parts of the SLD does).

thanks,
mike
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org