Actually, I don't think spaces are allowed in XML element or attribute names at all. Testing this in XMLSpy verifies this.
..Tom > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Pericles S. Nacionales > Sent: 28 February, 2008 4:29 PM > To: Fischer, Brian > Cc: mapserver-users@lists.osgeo.org > Subject: Re: [mapserver-users] WFS and typename issue > > The WFS 1.0.0 doesn't specifically say not to use spaces in a > typeName but all the examples don't contain spaces... The > space character always causes problem as part of a parameter > in web forms, it should be avoided. That said, if the > solution is as simple as escaping spaces in MapServer's GML > output then maybe it should be done. > > It's not just spaces either... any special character could > potentially be problematic (and maybe a potential security > hole). So, yes, you probably should tell the WFS service > author that it's bad karma to put spaces in typeNames and > featureIDs. :) Add underscores or remove spaces if possible. > > -Perry > > > Fischer, Brian wrote: > > After troubleshooting this a little further here is what I found. > > > > I get an invalid http request error if I try using an > escape character > > with a & in it. That is understandable. > > > > If I try using + or %20 it gets a little further and this > is the error > > I get. > > "msDrawMap(): Image handling error. Failed to draw layer named > > 'hydrowfs'. msOGRFileOpen(): OGR error. Open failed for OGR > connection > > `C:/ms4w/tmp/ms_tmp/ccc2661b5c5cc4dbff3d2d052e2e73c7.tmp.gml'. XML > > Parsing Error: Expected equal sign " > > > > Also when I try opening the .gml file in Gaia 3 it says there is an > > error reading the GML file. If I got through the GML file > and remove > > all the spaces from the typename and save the file. Then > it opens fine. > > > > It appears the problem is that MapServer is not escaping the space > > character in the temporary GML file when it creates it. I > don't know > > a lot about the rules for the GML file and if a spaces are > allowed or > > what the escape character should be. I guess my simpliest > solution is > > to try to get the WFS service author to remove the spaces > from their typenames. > > But I would be willing to report this as a bug in MapServer > if this is > > really a bug. Hopefully someone can let me know. > > > > Thanks, > > Brian > > > > Brian Fischer > > Houston Engineering, Inc. > > Maple Grove, MN > > (763) 493-4522 > > > > -----Original Message----- > > From: Milo van der Linden [mailto:[EMAIL PROTECTED] > > Sent: Thursday, February 28, 2008 2:38 PM > > To: Fischer, Brian > > Cc: Pericles S. Nacionales; mapserver-users@lists.osgeo.org > > Subject: Re: [mapserver-users] WFS and typename issue > > > > Have you tried using ? > > > > I had some sort of issue that looks like yours. > > > > like this: > > > > "gml_include_items" "MFIELD,KFIELD,DFIELD" > > "gml_MFIELD_alias" "A Field for M" > > > > I can retrieve fieldnames with spaces on my installation of > mapserver > > for a WMS GetFeatureInfo request. If the same doesn't work on WFS I > > would suggest filing a bug. > > > > Fischer, Brian schreef: > >> Just tried it and no + doesn't work. I also tried %20,   and > >>   > >> > >> > >> Brian Fischer > >> Houston Engineering, Inc. > >> Maple Grove, MN > >> (763) 493-4522 > >> > >> -----Original Message----- > >> From: Pericles S. Nacionales [mailto:[EMAIL PROTECTED] > >> Sent: Thursday, February 28, 2008 2:15 PM > >> To: Fischer, Brian > >> Cc: mapserver-users@lists.osgeo.org > >> Subject: Re: [mapserver-users] WFS and typename issue > >> > >> Brian, > >> > >> I take it the "+" character doesn't work? > >> > >> -Perry > >> > >> Fischer, Brian wrote: > >> > >>> Has anybody else experience problems when using a WFS > service where > >>> the typename has a space in it? I'm experiencing the WFS layers > >>> that > > > >>> don't have spaces work fine with MapServer, but ones that do have > >>> spaces produce invalid GML files. Is there an escape > character that > >>> can be used to represent the space in the typename? > >>> > >>> The WFS service I am trying to get to work is > >>> > http://www.datafinder.org/wfsconnector/com.esri.wfs.Esrimap/MN_Metro > >>> G > >>> I > >>> S_ > >>> > DataFinder_WFS_Water_Resources?request=getcapabilities&service=WFS&v > >>> e > >>> r > >>> si > >>> on=1.0.0 > >>> > >>> The layer without the space works fine, but the rest do not. > >>> > >>> Thanks, > >>> Brian > >>> > >>> Brian Fischer, CFM > >>> GIS Project Manager > >>> Houston Engineering, Inc. | Leave Nothing to ChanceTM > >>> 6901 East Fish Lake Road, Suite 140 > >>> Maple Grove, MN 55369 > >>> Phone: 763.493.4522 / Fax: 763.493.5572 > >>> Email: [EMAIL PROTECTED] > >>> <mailto:[EMAIL PROTECTED]> > >>> Website: www.houstonengineeringinc.com > >>> <http://www.houstonengineeringinc.com/> > >>> > >>> > >>> > >>> > >>> > -------------------------------------------------------------------- > >>> - > >>> - > >>> -- > >>> > >>> _______________________________________________ > >>> mapserver-users mailing list > >>> mapserver-users@lists.osgeo.org > >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >>> > >> _______________________________________________ > >> mapserver-users mailing list > >> mapserver-users@lists.osgeo.org > >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >> > >> > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users