[Mapserver-users] potential problem with layer names containi ng spaces

Tom Kralidis [Burlington] Tom.Kralidis at ec.gc.ca
Wed Nov 19 12:50:14 EST 2003


> -----Original Message-----
> From: bartvde at xs4all.nl [mailto:bartvde at xs4all.nl]
> Sent: Wednesday, November 19, 2003 12:09 PM
> To: mapserver-users at lists.gis.umn.edu
> Subject: [Mapserver-users] potential problem with layer names containing
spaces
> 
> 
> Hi list,
> 
> I have encountered a potential problem with layer names
> containing spaces. This will lead to invalid GML responses 
> when requesting GetFeatureInfo in the GML format.
> 
> What would be a good solution to overcome this?
> 

This can also be painful to parse for some who wish to process
GetFeatureInfo responses.  

Suggest to abstract the GetFeatureInfo reponse construct to not include data
as element names and / or attributes, yet values of said.

i.e.

<Layer name="Groningen kust vlakken 2002">
 <Feature>
 ...
 </Feature>
</Layer>

..Tom



> > a. when parsing the mapfile make sure no spaces are contained
> > in layer names (or is this too rigorous for applications not 
> > using GML?)
> > 
> > b. when generating the GML for GetFeatureInfo check the layer
> > names or check if the generated GML is valid and well-formed? 
> > If the GML is not valid or not well-formed it is better to 
> > generate a WMS Exception I guess than generating invalid GML.
> > 
> > Any thoughts on this?
> > 
> > Best regards,
> > Bart
> > 
> > excerpt:
> > 
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <msGMLOutput
> > 	 xmlns:gml="http://www.opengis.net/gml"
> > 	 xmlns:xlink="http://www.w3.org/1999/xlink"
> > 	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > 	<Groningen kust vlakken 2002_layer>
> > 		<Groningen kust vlakken 2002_feature>
> > 			<AREA>51785.891</AREA>
> > 			<PERIMETER>1290.295</PERIMETER>
> > 			<ZOSTOT>2</ZOSTOT>
> > 			<ZOSNOL>2</ZOSNOL>
> > 			<ZOSMAR>0</ZOSMAR>
> > etc.
> > 
> > _______________________________________________
> > Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
> > 
> 



More information about the mapserver-users mailing list