Skip to content

Commit

Permalink
Set QGIS WFS Server GML valid
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Oct 9, 2012
1 parent e9907cd commit 9e5762a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mapserver/qgswfsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ QDomDocument QgsWFSServer::describeFeatureType()
schemaElement.setAttribute( "xmlns:gml", "http://www.opengis.net/gml" );
schemaElement.setAttribute( "xmlns:qgs", "http://www.qgis.org/gml" );
schemaElement.setAttribute( "targetNamespace", "http://www.qgis.org/gml" );
schemaElement.setAttribute( "elementFromDefault", "qualified" );
schemaElement.setAttribute( "version", "1.0" );
doc.appendChild( schemaElement );

//xsd:import
Expand Down Expand Up @@ -601,15 +603,14 @@ void QgsWFSServer::startGetFeature( QgsRequestHandler& request, const QString& f

//wfs:FeatureCollection
fcString = "<wfs:FeatureCollection";
fcString += " xmlns=\"http://www.opengis.net/wfs\"";
fcString += " xmlns:wfs=\"http://www.opengis.net/wfs\"";
fcString += " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
fcString += " xsi:schemaLocation=\"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.opengis.net/gml " + hrefString.replace( "&", "&amp;" ) + "\"";
fcString += " xmlns:ogc=\"http://www.opengis.net/ogc\"";
fcString += " xmlns:gml=\"http://www.opengis.net/gml\"";
fcString += " xmlns:ows=\"http://www.opengis.net/ows\"";
fcString += " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
fcString += " xmlns:qgs=\"http://www.qgis.org/gml\"";
fcString += " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
fcString += " xsi:schemaLocation=\"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.qgis.org/gml " + hrefString.replace( "&", "&amp;" ) + "\"";
fcString += ">";
result = fcString.toUtf8();
request.startGetFeatureResponse( &result, format );
Expand Down

0 comments on commit 9e5762a

Please sign in to comment.