Skip to content

Commit

Permalink
WFS: deal with multiple <Query> in a stored query
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Nov 9, 2013
1 parent f8bc861 commit 3b092a3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mapwfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4316,6 +4316,7 @@ static int msWFSAnalyzeStoredQuery(mapObj* map,
{
CPLXMLNode* psRoot;
CPLXMLNode* psQuery;
CPLXMLNode* psIter;

psRoot = CPLParseXMLString(pszResolvedQuery);

Expand All @@ -4336,7 +4337,14 @@ static int msWFSAnalyzeStoredQuery(mapObj* map,
return MS_FAILURE;
}

msWFSParseXMLQueryNode(psQuery, wfsparams);
psIter = psQuery;
while( psIter != NULL )
{
if( psIter->eType == CXT_Element && strcmp(psIter->pszValue, "Query") == 0 ) {
msWFSParseXMLQueryNode(psIter, wfsparams);
}
psIter = psIter->psNext;
}

CPLDestroyXMLNode(psRoot);

Expand Down

0 comments on commit 3b092a3

Please sign in to comment.