[CITE-Forum] WFS-1.1: XPath expression can give rise to invalid secondary request (was: RE: Testing Locally)

Richard Martell rmartell at galdosinc.com
Mon Apr 29 13:03:27 EDT 2013

Hi all,

Looks like we have an anomaly in GetFeature-POST.xml :-(

The XPath expression behaves as expected when the resulting feature 
collection has gml:featureMembers/sf:PrimitiveGeoFeature [0..**].
This is how the RI presents the response.

However, if the response includes a sequence of gml:featureMember 
properties, the XPath expression //sf:PrimitiveGeoFeature[1] returns ALL 
PrimitiveGeoFeature nodes--it's as if the position predicate is ignored. 
In effect, this says to get all first sf:PrimitiveGeoFeature nodes (and 
they all have a gml:featureMember parent).

Note that explicitly specifying the descendant axis works as expected:

(b) /descendant::sf:PrimitiveGeoFeature[1]

As does using parentheses to return the first item from among all 
feature instances:

(c) (//sf:PrimitiveGeoFeature)[1]

The fix is to use either of the above expressions. 
Reported as CITE-792:



More information about the CITE-Forum mailing list