Bug 290 - Web Map Context document is invalid
: Web Map Context document is invalid
Status: CLOSED WONTFIX
: Chameleon
Widget
: 1.1
: PC Windows 2000
: P2 normal
: 1.99 beta 2
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-03-15 04:43 by
Modified: 2004-07-14 15:04 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-03-15 04:43:21
The WMC document generated using the DownloadContext widget is invalid according
to the schema.

These are the respective wms_ metadata tags from my MAP file which are relevant,
if I understood correctly Mapserver can only deal with empty styles which is why
my wms_style is an empty string:

          "wms_stylelist"	""
          "wms_style_default_title"	""
          "wms_style"	""

There is an empty StyleList in the WMC document, StyleList should always contain
a Style element. If the StyleList is left out, the document validates.

    <Layer queryable="0" hidden="0">
      <Server service="WMS" version="1.1.0" title="Geostreets">
        <OnlineResource xlink:type="simple" xlink:href="http://blabla&amp;"/>
      </Server>
      <Name>layer_1</Name>
      <Title>Geostreets</Title>
      <SRS>EPSG:28992</SRS>
      <FormatList>
        <Format>image/jpeg</Format>
        <Format current="1">image/png</Format>
      </FormatList>
      <StyleList>
      </StyleList>
    </Layer>
------- Comment #1 From 2004-03-15 09:18:11 -------
Why not just leave out the wms_style_list parameter in the mapfile?
------- Comment #2 From 2004-03-15 09:36:05 -------
That's a good point Daniel. This does solve the problem.

Although I always think it is unpretty for an application to generate invalid XML.

I have changed the resolution to WONTFIX.
------- Comment #3 From 2004-03-15 10:44:54 -------
Agreed that's not pretty, you may want to file a (low priority) MapServer bug
about this specific issue: an empty list is an obvious case that should be
handled better.

Note that this whole parameter validation issue is a grey area, and there are
many other ways to break the XML other than this one.  The problem is that if we
add too much validation in MapServer to catch all the possible invalid values
then we make the code more complex than it needs to be, and eventually end up
with something bloated, slow, and harder to maintain.  Not an easy choice...
------- Comment #4 From 2004-03-15 13:52:20 -------
I have created a bug with a low priority in the Mapserver bugzilla for this.

Reference is:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=595
------- Comment #5 From 2004-06-23 20:46:47 -------
Since this is a mapserver issue, I will close this bug and future comment I
assume will be tracked under the mapserver bug.
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=595
------- Comment #6 From 2004-07-14 15:04:19 -------
closing bug based on last comment