FYI, the valid way to extend the GetCapabilities is to use the <VendorSpecificCapabilities /> element. (See the WMS spec on the OGC pages www.opengeospatial.org)
-- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede, The Netherlands +31 (0)53 4874253 On 25-09-08 20:23, "Kralidis,Tom [Burlington]" <[EMAIL PROTECTED]> wrote: > > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Jochen Topf >> Sent: 25 September, 2008 9:49 AM >> To: Markus Spring >> Cc: Mapserver-users >> Subject: Re: [mapserver-users] How to pimp WMS meta information? >> >> On Tue, Sep 16, 2008 at 07:16:03AM +0200, Markus Spring wrote: >>> trying to set up a multi-map service based WMS mapservices and >>> OpenLayers, I would like to retrieve user-defined meta information >>> from a map via the GetCapabilities request. >>> >>> For example, if I define >>> >>> METADATA >>> WMS_TITLE "Palliativstationen" >>> WMS_ONLINERESOURCE "http://gis.local/wms/palliativ" >>> WMS_SRS "epsg:31468" >>> >>> WMS_SHOW_QUERY_IN "large_popup" >>> >>> END >>> >>> I would like to retrieve the value "large_popup" of >> WMS_SHOW_QUERY_IN >>> through the GetCapabilities call. The background idea is that this >>> information could be used by my application but should not >> harm other >>> people's use of the WMS service. >>> >>> Is there any viable way to accomplish this with a mapserver >> based WMS service? >> >> I have used the WMS keywords on a WMS layer to add special >> infos only needed for my application. Not the cleanest >> approach, because other applications will, of course, also >> see those special keywords you put in, but as a workaround it is ok. >> >> Would be nice if there was an "official" way to do this, though. >> > > Out of the box, MapServer will return a well-formed, valid XML document > which obeys the WMS standard. > > Having said this, you could use mapscript WxS > (http://mapserver.gis.umn.edu/docs/howto/wxs_mapscript) to, on > GetCapabilities, intercept the request/response mechanism and write out > a modified GetCapbilities XML document, adding in your own XML elements > and definitions, i.e.: > > <Layer> > <Name>foo</Name> > <Title>bar</Title> > <MyProperty name="WMS_SHOW_QUERY_IN">large_popup</MyProperty> > ... > > This would work, with the assumptions that: > > 1./ a WMS Capabilities parser which is doing DTD checking would choke on > this, as it is not part of the WMS DTD > 2./ if there is no DTD checking, the Capabilities will be processed, > only 'aware' clients would know what to do with this info > > Of course, if you want to be to-spec 100%, there are ways to extend DTDs > with inline ENTITY's, etc. :) > > Hope this helps. > > ..Tom > > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users