[Mapbender-commits] r8270 - trunk/mapbender/http/geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 29 02:31:23 EST 2012


Author: armin11
Date: 2012-02-28 23:31:23 -0800 (Tue, 28 Feb 2012)
New Revision: 8270

Modified:
   trunk/mapbender/http/geoportal/mod_readCSWResults.php
Log:
Bugfix

Modified: trunk/mapbender/http/geoportal/mod_readCSWResults.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_readCSWResults.php	2012-02-29 06:16:30 UTC (rev 8269)
+++ trunk/mapbender/http/geoportal/mod_readCSWResults.php	2012-02-29 07:31:23 UTC (rev 8270)
@@ -556,9 +556,9 @@
 			$dateStamp = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:dateStamp/*');
 			//or date time - check and extract this information
 			$dateStamp = substr($dateStamp[0],0,10);
-			$title = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString');
-			$orgaName = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString');
-			$abstract = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString');
+			$title = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString');
+			$orgaName = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString');
+			$abstract = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:identificationInfo/*/gmd:abstract/gco:CharacterString');
 			$accessUrl = $openSearchXml->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$index.']/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL');
 			
 			echo "<br>General first accessUrl: ".$accessUrl[0]."<br>";
@@ -632,10 +632,11 @@
         				
 			}
 
-
+			$isViewService = false;	
 			$accessUrl = $accessUrl[0];
+			$typeOfServiceUpper = strtoupper($typeOfService);
 			echo "<br>accessUrl: ".$accessUrl."<br>";
-			echo "<br>typeOfService:*".strtoupper($typeOfService)."*<br>";
+			echo "<br>typeOfService:*".$typeOfServiceUpper."*<br>";
 			echo "<br>typeOfRecord:*".$typeOfRecord."*<br>";
 
 			$title = $title[0];
@@ -648,7 +649,7 @@
 			}
 			
 			//check for view service type
-			if (strtoupper($typeOfService) == 'WMS' || strtoupper($typeOfService) == 'VIEW'  || strpos(strtoupper($typeOfService,'WMS')) !== false) {
+			if ($typeOfServiceUpper == 'WMS' || $typeOfServiceUpper == 'VIEW'  || strpos($typeOfServiceUpper,'WMS') !== false) {
 				$isViewService = true;	
 				echo "view service identified<br>";
 			}



More information about the Mapbender_commits mailing list