[Mapbender-commits] r4305 - branches/mifan_dev/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Jul 5 02:54:16 EDT 2009


Author: mifan
Date: 2009-07-05 02:54:15 -0400 (Sun, 05 Jul 2009)
New Revision: 4305

Modified:
   branches/mifan_dev/mapbender/http/classes/class_csw.php
Log:
debug


Modified: branches/mifan_dev/mapbender/http/classes/class_csw.php
===================================================================
--- branches/mifan_dev/mapbender/http/classes/class_csw.php	2009-07-05 05:07:56 UTC (rev 4304)
+++ branches/mifan_dev/mapbender/http/classes/class_csw.php	2009-07-05 06:54:15 UTC (rev 4305)
@@ -107,6 +107,9 @@
 		xml_parser_set_option($parser,XML_OPTION_TARGET_ENCODING,CHARSET);
 		xml_parse_into_struct($parser,$data,$value_array,$index_array);
 		
+		//echo "values:".print_r($value_array);
+		//echo "index:".print_r($vindex_array);
+		
 		$code = xml_get_error_code($parser);
 		if ($code) {
 			$line = xml_get_current_line_number($parser); 
@@ -117,29 +120,33 @@
 		
 		foreach($value_array as $element){
 			//Version
-			if((mb_strtoupper($element[tag]) == "csw:Capabilities" OR mb_strtoupper($element[tag]) == "Capabilities") && $element[type] == "open"){
+			echo "Print:";
+			print_r ($element);
+			echo "\n";
+			
+			if((mb_strtoupper($element[tag]) == "CSW:CAPABILITIES" OR mb_strtoupper($element[tag]) == "CAPABILITIES") && $element[type] == "open"){
 				$this->cat_version = $element[attributes][version];
 			}
 			//Title
-			if((mb_strtoupper($element[tag]) == "ows:Title" OR mb_strtoupper($element[tag]) == "Title") && $element[level] == '3'){
+			if((mb_strtoupper($element[tag]) == "OWS:TITLE" OR mb_strtoupper($element[tag]) == "TITLE") && $element[level] == '3'){
 				$this->cat_title = $this->stripEndlineAndCarriageReturn($element[value]);
 			}
 			//Abstract
-			if((mb_strtoupper($element[tag]) == "ows:Abstract" OR mb_strtoupper($element[tag]) == "Abstract") && $element[level] == '3'){
+			if((mb_strtoupper($element[tag]) == "OWS:ABSTRACT" OR mb_strtoupper($element[tag]) == "ABSTRACT") && $element[level] == '3'){
 				$this->cat_abstract = $this->stripEndlineAndCarriageReturn($element[value]);
 			}
 			//fees
-			if(mb_strtolower($element[tag]) == "ows:Fees" OR mb_strtolower($element[tag]) == "Fees"){
+			if(mb_strtolower($element[tag]) == "ows:fees" OR mb_strtolower($element[tag]) == "fees"){
 				$this->fees = $element[value];
 			}
 			//
-			if(mb_strtolower($element[tag]) == "ows:AccessConstraints" OR mb_strtolower($element[tag]) == "AccessConstraints"){
+			if(mb_strtolower($element[tag]) == "ows:accessconstraints" OR mb_strtolower($element[tag]) == "accessconstraints"){
 				$this->accessconstraints = $element[value];
 			}
-			if(mb_strtolower($element[tag]) == "ows:IndividualName" OR mb_strtolower($element[tag]) == "IndividualName"){
+			if(mb_strtolower($element[tag]) == "ows:individualname" OR mb_strtolower($element[tag]) == "individualname"){
 				$this->contactperson = $element[value];
 			}
-			if(mb_strtolower($element[tag]) == "ows:PositionName" OR mb_strtolower($element[tag]) == "PositionName"){
+			if(mb_strtolower($element[tag]) == "ows:positionname" OR mb_strtolower($element[tag]) == "positionname"){
 				$this->contactposition = $element[value];
 			}
 			if(mb_strtolower($element[tag]) == "contactorganization" OR mb_strtolower($element[tag]) == "contactorganization"){
@@ -160,18 +167,18 @@
 			if(mb_strtolower($element[tag]) == "country"){
 				$this->country = $element[value];
 			}
-			if(mb_strtolower($element[tag]) == "ows:Voice"){
+			if(mb_strtolower($element[tag]) == "ows:Voice" OR mb_strtolower($element[tag]) == "Voice"){
 				$this->contactvoicetelephone = $element[value];
 			}
 			if(mb_strtolower($element[tag]) == "contactfacsimiletelephone"){
 				$this->contactfacsimiletelephone = $element[value];
 			}
-			if(mb_strtolower($element[tag]) == "ows:ElectronicMailAddress"){
+			if(mb_strtolower($element[tag]) == "ows:electronicmailaddress" OR mb_strtolower($element[tag]) == "electronicmailaddress"){
 				$this->contactelectronicmailaddress = $element[value];
 			}
 			
 			//Store array of keywords
-	  		if(mb_strtolower($element[tag]) == "ows:Keyword"){
+	  		if(mb_strtolower($element[tag]) == "ows:keyword" OR mb_strtolower($element[tag]) == "keyword"){
 				$this->keywords[count($this->keywords)] = $element[value];
 			}
 			
@@ -217,9 +224,9 @@
 	
 	public function displayCatalog(){
 		echo "<br>id: " . $this->wms_id . " <br>";
-		echo "version: " . $this->wms_version . " <br>";
-		echo "title: " . $this->wms_title . " <br>";
-		echo "abstract: " . $this->wms_abstract . " <br>";
+		echo "version: " . $this->cat_version . " <br>";
+		echo "title: " . $this->cat_title . " <br>";
+		echo "abstract: " . $this->cat_abstract . " <br>";
 		echo "maprequest: " . $this->wms_getmap . " <br>";
 		echo "capabilitiesrequest: " . $this->wms_getcapabilities . " <br>";
 		echo "featureinforequest: " . $this->wms_getfeatureinfo . " <br>";



More information about the Mapbender_commits mailing list