[Mapbender-commits] r9785 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Sep 29 03:25:51 PDT 2017


Author: armin11
Date: 2017-09-29 03:25:51 -0700 (Fri, 29 Sep 2017)
New Revision: 9785

Modified:
   trunk/mapbender/http/classes/class_wfs_2_0_factory.php
Log:
Fix for xml parsing in case of wfs 2.0

Modified: trunk/mapbender/http/classes/class_wfs_2_0_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_2_0_factory.php	2017-09-29 10:17:49 UTC (rev 9784)
+++ trunk/mapbender/http/classes/class_wfs_2_0_factory.php	2017-09-29 10:25:51 UTC (rev 9785)
@@ -412,7 +412,11 @@
 
 				$myWfs->transaction =  html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Operation[@name="Transaction"]/ows:DCP/ows:HTTP/ows:Post/@xlink:href', $wfs20Cap));
 //get supported formats [mimetypes]
-				$myWfs->wfsOutputFormatArray = html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Parameter[@name="outputFormat"]/ows:AllowedValues/ows:Value/text()', $wfs20Cap));
+				$wfsOutputFormatArray = $this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Parameter[@name="outputFormat"]/ows:AllowedValues/ows:Value', $wfs20Cap);
+				foreach ($wfsOutputFormatArray as $outputFormat) {
+					$outputFormat = $this->getValue($xpath, './text()', $outputFormat);
+					$myWfs->OutputFormatArray[] = $outputFormat;
+				}	
 				//$wfs11Cap->xpath('/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Operation[@name="GetFeature"]/ows:Parameter[@name="outputFormat"]/ows:Value');
 
 				//get list of featuretypes
@@ -426,16 +430,17 @@
 					$featuretype_srs = $this->getValue($xpath, './wfs:DefaultCRS/text()', $featureType);
 					$otherCRSArray =  $xpath->query('./wfs:OtherCRS', $featureType);
 					foreach ($otherCRSArray as $otherCRS) {
-                        $crs = $this->getValue($xpath, './text()', $otherCRS);
+                        			$crs = $this->getValue($xpath, './text()', $otherCRS);
 						$e = new mb_notice("other crs: ".$crs);
 						$featuretype_crsArray[] = $crs;
 					}
 					$featuretypeOutputFormats = array();
 
-					$outputFormats = $this->getValue($xpath, './wfs:OutputFormats/wfs:Format/text()', $featureType);
+					$outputFormats = $this->getValue($xpath, './wfs:OutputFormats/wfs:Format', $featureType);
 					//$featureType->OutputFormats->Format;
 					
 					foreach ($outputFormats as $outputFormat) {
+						$outputFormat = $this->getValue($xpath, './text()', $outputFormat);
 						$featuretypeOutputFormats[] = $outputFormat;
 						$e = new mb_exception("class_wfs_2_0_factory.php: add outputFormat for WFS: ".$outputFormat);
 					}



More information about the Mapbender_commits mailing list