I have a feature collection that follows the generic structure displayed below:
<Activities>
<Run>
<id>1234-5678</id>
<GeneralInfo>
<StartTime delay="0">2017-10-18T04:10:00Z</StartTime>
</GeneralInfo>
</Run>
<Walk>
<id>5678-9012</id>
<GeneralInfo>
<StartTime delay="0">2017-10-18T02:10:00Z</StartTime>
</GeneralInfo>
</Walk>
</Activities>
I would like use an XPath filter that will select features whose StartTime was at a specific time, regardless of the type of activity. I've come up with a simple XPath that will target any element named StartTime
XPath=//StartTime
Which lead me to try the following fes Filter:
<fes:Filter xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:om="http://www.opengis.net/om/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fes:PropertyIsEqualTo>
<fes:ValueReference>//StartTime</fes:ValueReference>
<fes:Literal>2017-10-18T02:10:00Z</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
Which results in an exception being thrown from Geoserver.
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://internal.geoserver.local/geoserver/schemas/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.StringIndexOutOfBoundsException: String index out of range: 0
String index out of range: 0</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Is there a way to perform these relative XPath expression filters in Geoserver?
I have tried not including the leading '//', but I then get an empty feature collection back from geoserver. Essentially it is unable to find the attribute I am attempting to filter on.