Opened 14 years ago

Last modified 13 years ago

#3308 new defect

WFS server must support XPath expressions for referencing XML elements and attributes

Reported by: nsavard Owned by: assefa
Priority: normal Milestone: FUTURE
Component: WFS Server Version: svn-trunk (development)
Severity: normal Keywords: wfs1.1 xpath
Cc: assefa

Description

The "gml:" in "gml:description" in the sql request generated by a getfeature request, caused a Postgis error.

The request is:

http://gw.mapgears.com:8500/cgi-bin/mswfs110_ogc_cite?&service=WFS&version=1.1.0&request=GetFeature&typename=sf:PrimitiveGeoFeature&namespace=xmlns(sf=http://cite.opengeospatial.org/gmlsf)&filter=<ogc:Filter%20xmlns:gml="http://www.opengis.net/gml"%20xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>//gml:description</ogc:PropertyName><ogc:Literal>description-f008</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>

The error is:

msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed
msPostGISLayerWhichShapes(): Query error. Error (ERROR:  syntax error at or near ":"
LINE 1: ...,500575 500000,500000 500000))',4326) and ( (//gml:descripti...
                                                             ^
) executing query: select "description","name","intProperty","uriProperty","measurand","dateTimeProperty","dateProperty","decimalProperty","id",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex') as geom,"id" from primitivegeofeature where the_geom && GeomFromText('POLYGON((500000 500000,500000 500075,500575 500075,500575 500000,500000 500000))',4326) and ( (//gml:description= 'description-f008') )
msSaveMap(): Unable to access file. (/tmp/ms_tmp/4b730556_1dab_0._filter.map)
msEvalRegex(): Regular expression error. String failed expression test.

Change History (6)

comment:1 by nsavard, 14 years ago

Keywords: xpath added; getfeature request namespace sql removed
Summary: strip namespace of property name from sql request when a getfeature request with a filter is sent to the serverWFS server must support XPath expressions for referencing XML elements and attributes

Notice that the error is caused by XPath expressions not beeing supported in a WFS server.

comment:2 by assefa, 14 years ago

fix committed in r9792. We should not get the postgres error. Not sure yet if that is enough to pass the test (cite test is down right now and could not check it).

comment:3 by assefa, 14 years ago

Owner: changed from mapserverbugs to assefa

comment:4 by nsavard, 14 years ago

RE #comment:2 I'm not a programmer but I checked the revision, it seems to only strip the namespace. It doesn't seem to fix the xpath expressions. Isn't it?

comment:5 by assefa, 14 years ago

Norm, you are right. Only the strip on namespaces is done. Not sure yet how to address yet xpath expression.

comment:6 by assefa, 13 years ago

Milestone: 6.0 releaseFUTURE
Note: See TracTickets for help on using tickets.