[mapserver-commits] r7149 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Dec 6 06:50:19 EST 2007
Author: tomkralidis
Date: 2007-12-06 06:50:13 -0500 (Thu, 06 Dec 2007)
New Revision: 7149
Modified:
trunk/mapserver/mapogcsos.c
Log:
correctly check for request root element
Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c 2007-12-05 20:00:01 UTC (rev 7148)
+++ trunk/mapserver/mapogcsos.c 2007-12-06 11:50:13 UTC (rev 7149)
@@ -2660,29 +2660,21 @@
/* check for request */
- /* this works with @request */
+ psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:GetCapabilities");
- psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/*/@request");
- //psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:*");
+ if (psXPathTmp)
+ sosparams->pszRequest = strdup("GetCapabilities");
- if (psXPathTmp) {
- nodeset = psXPathTmp->nodesetval;
- sosparams->pszRequest = (char *)xmlNodeListGetString(doc, nodeset->nodeTab[0]->xmlChildrenNode, 1);
- }
+ psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:DescribeSensor");
- /* this is a test for root val */
+ if (psXPathTmp)
+ sosparams->pszRequest = strdup("DescribeSensor");
-/*
- psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"//");
-
- if (psXPathTmp) {
- //sosparams->pszRequest = "Foooo";
- //nodeset = psXPathTmp->nodesetval;
- //sosparams->pszRequest = (char *)nodeset->nodeTab[0]->name;
- //sosparams->pszRequest = (char *)psXPathTmp->stringval;
- }
-*/
+ psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:GetObservation");
+ if (psXPathTmp)
+ sosparams->pszRequest = strdup("GetObservation");
+
xmlXPathFreeObject(psXPathTmp);
/* check for outputformat */
More information about the mapserver-commits
mailing list