MapServer 5.0 WMS, requiring styles...

Daniel Morissette dmorissette at MAPGEARS.COM
Tue Oct 16 13:59:39 EDT 2007

Frank Warmerdam wrote:
> Following up on this, the RFC is at:
> I would appreciate comment for a day or two and then I will call for a 
> vote.

I understand the STYLES issue is real and needs to be addressed, but I 
don't like where this is going.

The RFC is encouraging developers and users to add a bunch of permissive 
exceptions in 5.1 and future releases that may not really be needed to 
achieve interoperability. This would just result in bloating the code 
and making it more complex and harder to test. BBOX and SIZE may have 
some defaults in the mapfile, but a GetMap request without them makes 
little sense so I would be against making them optional again (even if I 
used to use GetMap without them a lot myself when testing mapfiles in 
the past). OTOH, the STYLES option has a logical default stated in the 
spec (STYLES=<empty>) and I think we all agree that it would have made 
sense for STYLES to be optional in the spec in the first place.

I'd be more in favor of calling the options "pedantic" (with its 
negative connotation) and "permissive", with permissive being the 
default, and for the time being stating in the RFC that STYLES is the 
only parameter that changes behavior in permissive mode... and that 
adding more exceptions in the permissive mode should not be taken 
lightly as this encourages misuse of the specs and bloats the code with 
unnecessary exceptions.

With respect to scanning the WARNINGS in capabilities. At least in the 
case of WMS, MapServer should already be producing suitable defaults in 
addition to the warnings (making the response compliant anyway). If it 
is not possible to produce a suitable default then an exception is 
already issued, so there should be nothing to do on that front, unless 
WFS or WCS were implemented differently.

Finally, in case anyone is worried about that, making STYLES optional 
will not prevent us from getting compliance certification since the CITE 
tests do not check whether a server enforces the requirement for the 
STYLES parameter. That could be why so many servers out there never 
implemented the requirement for STYLES and so many clients were able to 
get away without it.

Daniel Morissette

More information about the mapserver-dev mailing list