MCPcopy Index your code
hub / github.com/MapServer/MapServer / msSLDParseLogicalExpression

Function msSLDParseLogicalExpression

mapogcsld.c:5400–5438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5398
5399
5400char *msSLDParseLogicalExpression(char *pszExpression, const char *pszWfsFilter)
5401{
5402 FilterEncodingNode *psNode = NULL;
5403 char *pszFLTExpression = NULL;
5404 char *pszTmp = NULL;
5405
5406 if (!pszExpression || strlen(pszExpression) <=0)
5407 return NULL;
5408
5409
5410 /* psNode = BuildExpressionTree(pszExpression, NULL); */
5411 psNode = BuildExpressionTree(pszExpression, NULL);
5412
5413 if (psNode)
5414 {
5415 pszFLTExpression = msSLDBuildFilterEncoding(psNode);
5416 if (pszFLTExpression)
5417 {
5418 pszTmp = msStringConcatenate(pszTmp, "<ogc:Filter>");
5419 if (pszWfsFilter)
5420 {
5421 pszTmp = msStringConcatenate(pszTmp, "<ogc:And>");
5422 pszTmp = msStringConcatenate(pszTmp, (char *)pszWfsFilter);
5423 }
5424 pszTmp = msStringConcatenate(pszTmp, pszFLTExpression);
5425
5426 if (pszWfsFilter)
5427 pszTmp = msStringConcatenate(pszTmp, "</ogc:And>");
5428
5429 pszTmp = msStringConcatenate(pszTmp, "</ogc:Filter>\n");
5430
5431 free(pszFLTExpression);
5432 pszFLTExpression = pszTmp;
5433 }
5434
5435 }
5436
5437 return pszFLTExpression;
5438}
5439
5440/************************************************************************/
5441/* char *msSLDParseExpression(char *pszExpression) */

Callers 1

msSLDGetFilterFunction · 0.85

Calls 3

BuildExpressionTreeFunction · 0.85
msSLDBuildFilterEncodingFunction · 0.85
msStringConcatenateFunction · 0.85

Tested by

no test coverage detected