<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>WMS default STYLE handled in an odd manner</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi List,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have experienced a problem with the handling of the STYLE parameter in WMS requests to MapServer.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Default STYLE can be specified in several ways: </FONT>

<BR><FONT SIZE=2 FACE="Arial">Either you can specify nothing, or &quot;empty commas&quot; which should be expanded to &quot;default&quot; for all layers. Or you can explicitly declare &quot;default&quot;. It seems MapServer has a problem when you want this automatic expansion to &quot;default&quot;, when at the same time you are asking for another STYLE different from &quot;default&quot;.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">In my experience, the following examples all work fine on MapServer 6.0.1:</FONT>

<BR><FONT SIZE=2 FACE="Arial">&quot;LAYERS=&lt;layer1&gt;,&lt;layer2&gt;,&lt;layer3&gt;&amp;STYLES=&quot;<BR>
&quot;LAYERS=&lt;layer1&gt;,&lt;layer2&gt;,&lt;layer3&gt;&amp;STYLES=,,&quot; </FONT>

<BR><FONT SIZE=2 FACE="Arial">&quot;LAYERS=&lt;layer1&gt;,&lt;layer2&gt;,&lt;layer3&gt;&amp;STYLES=default,default,default&quot; </FONT>

<BR><FONT SIZE=2 FACE="Arial">&quot;LAYERS=&lt;layer1&gt;,&lt;layer2&gt;,&lt;layer3&gt;&amp;STYLES=&lt;some_style&gt;,default,default&quot; </FONT>

<BR><FONT SIZE=2 FACE="Arial">&quot;LAYERS=&lt;layer1&gt;,&lt;layer2&gt;,&lt;layer3&gt;&amp;STYLES=&lt;some_style&gt;,default,&quot;&nbsp; (this is the really interesting one...)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&#8230;but these do not, although I would expect them to:</FONT>

<BR><FONT SIZE=2 FACE="Arial">&quot;LAYERS=&lt;layer1&gt;,&lt;layer2&gt;,&lt;layer3&gt;&amp;STYLES=&lt;some_style&gt;,,&quot; </FONT>

<BR><FONT SIZE=2 FACE="Arial">&quot;LAYERS=&lt;layer1&gt;,&lt;layer2&gt;,&lt;layer3&gt;&amp;STYLES=&lt;some_style&gt;,,default&quot; (in comparison with the last listed working example, this is also very interesting...)</FONT></P>

<P><FONT SIZE=2 FACE="Arial">The error message that I get:</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">msWMSLoadGetMapParams(): WMS server error. Invalid style (</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">&lt;some_style&gt;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">,,). Mapserver is expecting an empty string for the STYLES : STYLES= or STYLES=,,, or using keyword default&nbsp; STYLES=default,default, &#8230;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">&quot;</FONT></P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">So it seems that you cannot declare a style different from &quot;default&quot; for one layer and at the same time expect MapServer to automatically expand empty commas for the rest?</FONT></P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">Regards</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">Jonas Nielsen</FONT>
</P>
<BR>

</BODY>
</HTML>