<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Michael Schulz ha scritto:
<blockquote
 cite="mid:e750b12e0907310413x156db31cne33b9803005d511f@mail.gmail.com"
 type="cite">
  <pre wrap="">Hi Andrea,

mapserver uses sld in "library" mode, meaning that if for a certain
layer of the mapfile an sld symbolization is provided it takes
precedence over the mapfile symbolization. If for another layer no sld
id provided, then the mapfile symbolization is used. Thus, As far as I
know you can only "replace" the symbolization of a complete layer and
not add styling in a sense of taking the labelling definitions from
the mapfile and the fill-color from the sld for one layer.
  </pre>
</blockquote>
Yes, it's working now ;)<br>
<blockquote
 cite="mid:e750b12e0907310413x156db31cne33b9803005d511f@mail.gmail.com"
 type="cite">
  <pre wrap="">
It may nevertheless be that some definitions regarding symbolization
are mixed, e.g. the transparency settings of a layer is kept when
applying an sld (at least this was the case for older versions).

When you really want to add something to the symbolization, a possible
approach would be to use the getstyle request to obtain mapserver's
sld-representation of the current layer styling, then you could add or
modify that and sent it back modified for a getmap request.
  </pre>
</blockquote>
Michael, using java, we get the layer's style from the request. <br>
Before doing the new request to WMS server, we tried to extract the <br>
old style and then add a new style (in the new request there are&nbsp; the
old and the&nbsp; new ones)<br>
<br>
So using geotools we have:<br>
<blockquote>[...]<br>
&nbsp; StyleImpl styleImpl = new StyleImpl(); // istantiate new Style<br>
&nbsp; List&lt;FeatureTypeStyle&gt; featuresStyles = new
ArrayList&lt;FeatureTypeStyle&gt;(); //define list of styles<br>
&nbsp; featuresStyles.add(featureTypeStyle); // defining style list<br>
&nbsp; styleImpl.setFeatureStyles(featuresStyles);&nbsp;&nbsp; // applying feature
styles to the current style<br>
&nbsp; <br>
&nbsp; List&lt;StyleImpl&gt; st = new ArrayList&lt;StyleImpl&gt;(); // the
new style list<br>
&nbsp; st.add(style); // adding the old style coming from the request<br>
&nbsp; st.add(styleImpl); // adding our new style<br>
&nbsp;&nbsp; <br>
&nbsp; // then defining the new request with layer...<br>
&nbsp; Layer l = new Layer();&nbsp; <br>
&nbsp; l.setStyles(st);<br>
&nbsp; l.setName("nycroads");<br>
&nbsp; request.addLayer(l);<br>
  <br>
[...]<br>
</blockquote>
So we are trying to: <br>
&nbsp;- ask getCapabilites to WMS&nbsp; server<br>
&nbsp;- retrieving the style list from the layer <br>
&nbsp;- retrieve the old style from the layer<br>
&nbsp;- create a new style for the layer<br>
&nbsp;- insert one old style and a new one to the layer<br>
&nbsp;- do a request with the elaborated layer<br>
<br>
result: not working :)<br>
<br>
is it a good approach?<br>
<br>
Thank you,<br>
Andrea<br>
<br>
<br>
</body>
</html>