[mapserver-commits] r8511 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Fri Feb 6 16:21:47 EST 2009
Author: tomkralidis
Date: 2009-02-06 16:21:47 -0500 (Fri, 06 Feb 2009)
New Revision: 8511
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapogcsos.c
Log:
fix some XML validity issues (#2646)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-02-06 20:30:43 UTC (rev 8510)
+++ trunk/mapserver/HISTORY.TXT 2009-02-06 21:21:47 UTC (rev 8511)
@@ -12,6 +12,8 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- fix some XML validity issues (#2646)
+
- Fixed endianness issues with wide character strings for ArcSDE (#2878).
Thanks Russell McOrmond
Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c 2009-02-06 20:30:43 UTC (rev 8510)
+++ trunk/mapserver/mapogcsos.c 2009-02-06 21:21:47 UTC (rev 8511)
@@ -224,7 +224,7 @@
{
pszTmp =
msOWSLookupMetadata(&(GET_LAYER(map, i)->metadata), "S",
- "observedProperty_id");
+ "observedproperty_id");
if (pszTmp && (strcasecmp(pszTmp, pszProperty) == 0))
{
lp = (GET_LAYER(map, i));
@@ -273,13 +273,13 @@
psNode = xmlNewChild(psParent, NULL, BAD_CAST "observedProperty", NULL);
psCompNode = xmlNewChild(psNode, psNsSwe, BAD_CAST "CompositePhenomenon", NULL);
pszValue = msOWSLookupMetadata(&(lp->metadata), "S",
- "observedProperty_id");
+ "observedproperty_id");
if (pszValue)/*should always be true */
xmlNewNsProp(psCompNode, psNsGml,
BAD_CAST "id", BAD_CAST pszValue);
pszValue = msOWSLookupMetadata(&(lp->metadata), "S",
- "observedProperty_name");
+ "observedproperty_name");
if (pszValue)
psNode = xmlNewChild(psCompNode, psNsGml,
BAD_CAST "name", BAD_CAST pszValue);
@@ -670,7 +670,6 @@
psNode = xmlNewChild(psParent, NULL, BAD_CAST "member", NULL);
psObsNode = xmlNewChild(psNode, NULL, BAD_CAST "Observation", BAD_CAST pszValue);
-
/* order of elements is time, location, procedure, observedproperty
featureofinterest, result */
@@ -706,7 +705,7 @@
msOWSLookupMetadata(&(lp->metadata), "S",
"offering_id"),
msOWSLookupMetadata(&(lp->metadata), "S",
- "observedProperty_id"));
+ "observedproperty_id"));
if (lp != lpfirst)
status = msLayerOpen(lpfirst);
@@ -755,14 +754,10 @@
/*observed property*/
pszValue = msOWSLookupMetadata(&(lp->metadata), "S",
- "observedProperty_id");
+ "observedproperty_id");
if (pszValue)
- {
- /* psNode= xmlNewChild(psObsNode, psNsOm, BAD_CAST "observedProperty", BAD_CAST pszValue); */
msSOSAddPropertyNode(psNsSwe, psNsXLink, psObsNode, lp, psNsGml);
- }
-
/*TODO add featureofinterest*/
psNode = xmlNewChild(psObsNode, psNsOm, BAD_CAST "featureOfInterest", NULL);
@@ -791,19 +786,7 @@
pszFeatureId = msOWSLookupMetadata(&(lp->metadata), "OSG", "featureid");
if(pszFeatureId && msLayerOpen(lp) == MS_SUCCESS && msLayerGetItems(lp) == MS_SUCCESS)
- { /* find the featureid amongst the items for this layer */
- for(j=0; j<lp->numitems; j++) {
- if(strcasecmp(lp->items[j], pszFeatureId) == 0) { /* found it */
- break;
- }
- }
- if (j<lp->numitems)
- xmlNewNsProp(psNode, psNsGml, BAD_CAST "id", BAD_CAST sShape.values[j]);
- msLayerClose(lp);
- }
- if(pszFeatureId && msLayerOpen(lp) == MS_SUCCESS && msLayerGetItems(lp) == MS_SUCCESS)
-
xmlSetNs(psLayerNode,xmlNewNs(psLayerNode, NULL, NULL));
/*bbox*/
@@ -827,7 +810,7 @@
msOWSLookupMetadata(&(lp->metadata), "S",
"offering_id"),
msOWSLookupMetadata(&(lp->metadata), "S",
- "observedProperty_id"));
+ "observedproperty_id"));
if (lpfirst && msLayerOpen(lpfirst) == MS_SUCCESS &&
msLayerGetItems(lpfirst) == MS_SUCCESS)
@@ -932,7 +915,7 @@
msOWSLookupMetadata(&(lp->metadata), "S",
"offering_id"),
msOWSLookupMetadata(&(lp->metadata), "S",
- "observedProperty_id"));
+ "observedproperty_id"));
if (lp == lpfirst || (lpfirst && msLayerOpen(lpfirst) == MS_SUCCESS &&
@@ -977,7 +960,7 @@
/* Add a member node used for getObservation request using */
/* Observation as the result format. */
/************************************************************************/
-xmlNodePtr msSOSAddMemberNodeObservation(xmlNsPtr psNsGml, xmlNsPtr psNsSos, xmlNsPtr psNsSwe, xmlNsPtr psNsXLink, xmlNodePtr psParent, mapObj *map,
+xmlNodePtr msSOSAddMemberNodeObservation(xmlNsPtr psNsGml, xmlNsPtr psNsSos, xmlNsPtr psNsOm, xmlNsPtr psNsSwe, xmlNsPtr psNsXLink, xmlNodePtr psParent, mapObj *map,
layerObj *lp, const char *pszProcedure)
{
char *pszTmp = NULL;
@@ -992,7 +975,7 @@
msOWSLookupMetadata(&(lp->metadata), "S",
"offering_id"),
msOWSLookupMetadata(&(lp->metadata), "S",
- "observedProperty_id"));
+ "observedproperty_id"));
if (psParent)
{
psMemberNode = xmlNewChild(psParent, NULL, BAD_CAST "member", NULL);
@@ -1017,7 +1000,7 @@
if (n == 2) /* end time is empty. It is going to be set as "now*/
pszEndTime = tokens[1];
- psNode = xmlAddChild(psObsNode, msSOSAddTimeNode(psNsSos, psNsGml, tokens[0], pszEndTime));
+ psNode = xmlAddChild(psObsNode, msSOSAddTimeNode(psNsOm, psNsGml, tokens[0], pszEndTime));
msFreeCharArray(tokens, n);
}
@@ -1619,7 +1602,7 @@
{
if ((value =
msOWSLookupMetadata(&(GET_LAYER(map, j)->metadata), "S",
- "observedProperty_id")))
+ "observedproperty_id")))
{
for (k=0; k<nProperties; k++)
{
@@ -2415,7 +2398,7 @@
if (msOWSLookupMetadata(&(GET_LAYER(map, i)->metadata), "S", "procedure_item") == NULL)
{
pszProcedure = msOWSLookupMetadata(&(lp->metadata), "S", "procedure");
- psObservationNode = msSOSAddMemberNodeObservation(psNsGml, psNsSos, psNsSwe, psNsXLink, psRootNode, map, (GET_LAYER(map, i)),
+ psObservationNode = msSOSAddMemberNodeObservation(psNsGml, psNsSos, psNsOm, psNsSwe, psNsXLink, psRootNode, map, (GET_LAYER(map, i)),
pszProcedure);
/*add a result node*/
psResultNode = xmlNewChild(psObservationNode, NULL, BAD_CAST "result", NULL);
@@ -2475,7 +2458,7 @@
*nDiffrentProc);
paDiffrentProc[nDiffrentProc-1].pszProcedure = strdup(pszProcedureValue);
- psObservationNode = msSOSAddMemberNodeObservation(psNsGml, psNsSos, psNsSwe, psNsXLink, psRootNode, map,
+ psObservationNode = msSOSAddMemberNodeObservation(psNsGml, psNsSos, psNsOm, psNsSwe, psNsXLink, psRootNode, map,
(GET_LAYER(map, i)),
pszProcedureValue);
msFree(pszProcedureValue);
@@ -2678,7 +2661,7 @@
/************************************************************************/
int msSOSDescribeObservationType(mapObj *map, sosParamsObj *sosparams) {
if (!sosparams->pszObservedProperty) {
- msSetError(MS_SOSERR, "Missing mandatory parameter observedProperty", "msSOSDescribeObservationType()");
+ msSetError(MS_SOSERR, "Missing mandatory parameter observedproperty", "msSOSDescribeObservationType()");
return msSOSException(map, "observedproperty", "MissingParameterValue");
}
msSetError(MS_SOSERR, "Not yet implemented", "msSOSDescribeObservationType()");
More information about the mapserver-commits
mailing list