I'm trying to publish a layer with a style that allows the extended WMS request to specify what image bands to map to the RGB values. Based on existing examples I assumed that my SLD should have something like the following RasterSymbolizer element:
<RasterSymbolizer>
<ChannelSelection>
<RedChannel>
<SourceChannelName>
<ogc:Function name="env">
<ogc:Literal>redchan</ogc:Literal>
<ogc:Literal>1</ogc:Literal>
</ogc:Function>
</SourceChannelName>
</RedChannel>...
But the SLD validation fails with the following error:
Element 'SourceChannelName' is a simple type, so it must have no element information item [children]
I am following this documentation:
http://docs.geoserver.org/stable/en/user/styling/sld/reference/rastersymbolizer.html http://docs.geoserver.org/stable/en/user/styling/sld/extensions/substitution.html
Is there a way to do this or is it not supported for the ChannelSelection element? Are there any more examples and/or documentation for SLD variable substitution that I can look at?