Opened 15 years ago

Last modified 14 years ago

#3143 assigned defect

WMS 1.3.0 does not support *_namespace_uri and *_namespace_prefix metadata

Reported by: dmorissette Owned by: assefa
Priority: normal Milestone: 6.0 release
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: tomkralidis

Description

While looking into ticket #3142, I found out that the implementation of WMS 1.3.0 has hardcoded namespace prefix and URI. The code should be upgraded to support the *_namespace_uri and *_namespace_prefix metadata which are supported for other specs.

Change History (6)

comment:1 by tomkralidis, 15 years ago

[devgeo:/home/tkralidi/foss4g/mapserver/svn/trunk/mapserver]$ grep "mapserver.gis.umn.edu/m" *.[ch]
mapogcsos.c:  const char *user_namespace_uri = "http://mapserver.gis.umn.edu/mapserver";
mapwfs.c:  const char *user_namespace_uri = "http://mapserver.gis.umn.edu/mapserver";
mapwfs.c:  const char *user_namespace_uri = "http://mapserver.gis.umn.edu/mapserver";
mapwms.c:                  "   xmlns:ms=\"http://mapserver.gis.umn.edu/mapserver\""
mapwms.c:                  " http://mapserver.gis.umn.edu/mapserver %sservice=WMS&version=1.3.0&request=GetSchemaExtension\"",
mapwms.c:    msIO_printf("<schema xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:wms=\"http://www.opengis.net/wms\" xmlns:ms=\"http://mapserver.gis.umn.edu/mapserver\" targetNamespace=\"http://mapserver.gis.umn.edu/mapserver\" elementFormDefault=\"qualified\" version=\"1.0.0\">\n");
[devgeo:/home/tkralidi/foss4g/mapserver/svn/trunk/mapserver]$ 

Notes: the namespace in the case mapwms.c should always be the default.

Perhaps we need a function like {{( msOWSGetDefaultNamespace(map.web.metadata, version) }}} which would return an object with namespace prefix and URI or something. I thought there was something like this in the codebase already, but I guess. not.

comment:2 by assefa, 14 years ago

Does it make sense for a user to define another namespace/prefix for wms? In this case, It is used for the getcapabilities request to extend it and be able to define/advertise the GetStyles operation as part of the capabilities:

... <ms:GetStyles>

...

we have at the top of the document:

xmlns:ms="http://mapserver.gis.umn.edu/mapserver"

http://mapserver.gis.umn.edu/mapserver http://localhost/cgi-bin/mapserv.exe?map=f:/msapps/world_testdata/map/world_testdata.map&amp;service=WMS&amp;version=1.3.0&amp;request=GetSchemaExtension

I am not sure what the user would gain by being able to define another namespace.

Note that I have done the changes locally and tested it, but would like to clarify the use before committing and adding to the docs.

comment:3 by dmorissette, 14 years ago

I don't remember the actual reason why I thought this might be needed, other than consistency with the other specs. Since I can't come up with good reasons, and you both say that we should always use the default, then feel free to close as invalid and sorry for the noise.

comment:4 by assefa, 14 years ago

I was in the same boat since I could not come up with a good reason. Tom any comments on this?

comment:5 by tomkralidis, 14 years ago

There's no reason for a user to change this, it's a set namespace in this context (much like the WMS 1.3.0 namespace itself).

Having said this, it would be nice if there was a centralized area where the core MapServer namespace uri / prefix was defined (either variable or function).

This would cut down on hardcoding the actual values and have them set in one place.

comment:6 by assefa, 14 years ago

Milestone: 5.6 release6.0 release
Status: newassigned

ok thanks. I will add a utility function in mapows to return these static value. Will commit just after 5.6 release.

Note: See TracTickets for help on using tickets.