Opened 19 years ago

Closed 19 years ago

#1346 closed defect (invalid)

FIlter: AND, OR and NOT instead of And Or and Not

Reported by: bartvde@… Owned by: mapserverbugs
Priority: high Milestone: 4.6 release
Component: WFS Client Version: 4.4
Severity: normal Keywords:
Cc:

Description

The code in mapopgcfilter.c still has the wrong XML case for these operators:

        if (psNode->pszValue && strcasecmp(psNode->pszValue, "AND") == 0)
          panResults = FLTArraysAnd(panLeftResults, nLeftResult, 
                                  panRightResults, nRightResult, &nResults);
        else if (psNode->pszValue && strcasecmp(psNode->pszValue, "OR") == 0)
          panResults = FLTArraysOr(panLeftResults, nLeftResult, 
                                 panRightResults, nRightResult, &nResults);

        else if (psNode->pszValue && strcasecmp(psNode->pszValue, "NOT") == 0)
          panResults = FLTArraysNot(panLeftResults, nLeftResult, map, 
                                   iLayerIndex, &nResults);


Should be Not (or ogc:Not), Or (or ogc:Or) and And (or ogc:And).

Change History (2)

comment:1 by bartvde@…, 19 years ago

Milestone: 4.6 release
Assefa, if you worry about breaking apps we could test for both AND as well as
And (ogc:And)? But currently a valid Filter won't get interpreted by Mapserver
which is quite serious. We need to create invalid OGC requests in order to make
things work.

For the WMS client this code was changed Feb 2005:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1150

Setting target to 4.6.

comment:2 by assefa, 19 years ago

Resolution: invalid
Status: newclosed
Bart,

 This should not cause a prolem if you use <And> or <ogc:And>. 
All the name spaces are stripped at the beginning so if you have <ogc:And> you 
end up with <And> and the function your are refering are using strcasecmp 
which is case incensitive comparasion.

If anything, the addition would be to do a case comparing to enforce the 
syntax. You can enter a new bug for this.

If there is a case to reproduce what you descibed, please reopen the bug.

Marking it as invalid.
Note: See TracTickets for help on using tickets.