[Mapbender-commits] r8581 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Mar 12 03:27:54 PDT 2013
Author: armin11
Date: 2013-03-12 03:27:53 -0700 (Tue, 12 Mar 2013)
New Revision: 8581
Modified:
trunk/mapbender/http/classes/class_wfs_1_1_factory.php
Log:
Bugfix for registrate WFS 1.1.0 where namespace wfs is used at featuretype declaration (e.g. ArcGIS Server). Further investigation is needed.
Modified: trunk/mapbender/http/classes/class_wfs_1_1_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_1_1_factory.php 2013-03-04 10:20:56 UTC (rev 8580)
+++ trunk/mapbender/http/classes/class_wfs_1_1_factory.php 2013-03-12 10:27:53 UTC (rev 8581)
@@ -200,10 +200,11 @@
$wfs11Cap->registerXPathNamespace("wfs", "http://www.opengis.net/wfs");
$wfs11Cap->registerXPathNamespace("ows", "http://www.opengis.net/ows");
- $wfs11Cap->registerXPathNamespace("xmlns", "http://www.opengis.net/gml");
+ $wfs11Cap->registerXPathNamespace("gml", "http://www.opengis.net/gml");
$wfs11Cap->registerXPathNamespace("ogc", "http://www.opengis.net/ogc");
$wfs11Cap->registerXPathNamespace("xlink", "http://www.w3.org/1999/xlink");
$wfs11Cap->registerXPathNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
+ $wfs11Cap->registerXPathNamespace("default", "http://www.opengis.net/wfs");
//some debug
//$e = new mb_notice("XML string from memory: ".$wfs11Cap->asXML());
$myWfs->version = $wfs11Cap->xpath('/wfs:WFS_Capabilities/@version');
@@ -277,6 +278,17 @@
foreach ($capFeatureTypes as $featureType) {
//debug
$e = new mb_notice("ft: ".$featureType->asXML());
+ //check if the wfs namespaces are used in the featuretype object - as done by e.g. ArcGIS Server
+ $wfsNamespaceUsed = false;
+ $ftNamespaces = $featureType->getNameSpaces(true);
+ foreach ($ftNamespaces as $key => $value) {
+ if ($value == 'http://www.opengis.net/wfs') {
+ $wfsNamespaceUsed = true;
+ }
+ }
+ if ($wfsNamespaceUsed) {
+ $featureType = $featureType->children('http://www.opengis.net/wfs');
+ }
$featuretype_name = $this->stripEndlineAndCarriageReturn($featureType->Name[0]);
$featuretype_title = $this->stripEndlineAndCarriageReturn($featureType->Title[0]);
$featuretype_abstract = $this->stripEndlineAndCarriageReturn($featureType->Abstract[0]);
More information about the Mapbender_commits
mailing list