<?xml version="1.0" encoding="utf-8" ?>
<wfs:StoredQueryList
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:myns="http://www.someserver.com/myns"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd"
service="WFS"
version="2.0.0">
<wfs:StoredQueryDefinition id="urn:StoredQueries:AttributeDemo">
<wfs:Title>Attribute request</wfs:Title>
<wfs:Abstract>test Attribute request</wfs:Abstract>
<wfs:Parameter name="myrank" type="xsd:double"/>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Cities"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<wfs:Query typeName="myns:cities">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:Literal>POP_RANK</fes:Literal>
<fes:Literal>${myrank}</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:StoredQueries:SpatialDemo">
<wfs:Title>Spatial request</wfs:Title>
<wfs:Abstract>test Spatial Request</wfs:Abstract>
<wfs:Parameter name="coordinates" type="xsd:string"/>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Cities"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<wfs:Query typeName='myns:Cities'>
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>Shape</ogc:PropertyName>
<gml:Box srsName="urn:x-ogc:def:crs:EPSG:4326">
<gml:coordinates>${coordinates}</gml:coordinates>
</gml:Box>
</ogc:BBOX>
</ogc:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:StoredQueries:SpatialAndAttributeDemo">
<wfs:Title>Spatial and Attribute Request</wfs:Title>
<wfs:Abstract>Select all cities with POP > 12000000 and BBOX (0,0,180,90)</wfs:Abstract>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Cities"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<wfs:Query typeName='myns:Cities'>
<ogc:Filter>
<fes:And>
<ogc:BBOX>
<ogc:PropertyName>Shape</ogc:PropertyName>
<gml:Box srsName="urn:x-ogc:def:crs:EPSG:4326">
<gml:coordinates>0,0 90,180</gml:coordinates>
</gml:Box>
</ogc:BBOX>
<fes:PropertyIsGreaterThan>
<fes:Literal>POP</fes:Literal>
<fes:Literal>12000000</fes:Literal>
</fes:PropertyIsGreaterThan>
</fes:And>
</ogc:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:StoredQueries:QueryCitiesByID">
<wfs:Title>Select feature by ID</wfs:Title>
<wfs:Abstract>test selecting feature by ID</wfs:Abstract>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Cities"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<wfs:Query typeName="myns:cities">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Literal>OBJECTID</ogc:Literal>
<ogc:Literal>${ID}</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
<wfs:Title>urn:ogc:def:query:OGC-WFS::GetFeatureById predefined stored query</wfs:Title>
<wfs:Abstract>This query support all layers in the map</wfs:Abstract>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Cities,myns:Continent,myns:World"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<!-- Cities -->
<wfs:Query typeName="myns:Cities">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Literal>OBJECTID</ogc:Literal>
<ogc:Literal>${ID}</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
<!-- Continent -->
<wfs:Query typeName="myns:Continent">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Literal>OBJECTID</ogc:Literal>
<ogc:Literal>${ID}</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
<!-- World -->
<wfs:Query typeName="myns:World">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Literal>OBJECTID</ogc:Literal>
<ogc:Literal>${ID}</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
<!-- -->
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:StoredQueries:FunctionCHAR_LENGTH">
<wfs:Title>Function CHAR_LENGTH</wfs:Title>
<wfs:Abstract>test Function CHAR_LENGTH</wfs:Abstract>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Cities"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<wfs:Query typeName="myns:cities">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:Function name="CHAR_LENGTH">
<fes:Literal>CITY_NAME</fes:Literal>
</fes:Function>
<fes:Literal>2</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:StoredQueries:FunctionSUBSTRING">
<wfs:Title>Function CHAR_LENGTH</wfs:Title>
<wfs:Abstract>test Function CHAR_LENGTH</wfs:Abstract>
<wfs:QueryExpressionText>
<wfs:Query typeName="myns:cities">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:Function name="SUBSTRING">
<fes:Literal>CITY_NAME</fes:Literal>
<fes:Literal>2</fes:Literal>
<fes:Literal>3</fes:Literal>
</fes:Function>
<fes:Literal>os</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:StoredQueries:MyStoredQuery">
<wfs:Title>MyStoredQuery</wfs:Title>
<wfs:Abstract>some tested MyStoredQuery</wfs:Abstract>
<wfs:Parameter name="AreaOfInterest" type="gml:PolygonPropertyType"/>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Parks myns:Lakes myns:Rivers"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<wfs:Query typeName="myns:cities">
<ogc:Filter>
<ogc:Within>
<ogc:ValueReference>Shape</ogc:ValueReference>
${AreaOfInterest}
</ogc:Within>
</ogc:Filter>
</wfs:Query>
<wfs:Query typeName="myns:cities">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Literal>POP_RANK</ogc:Literal>
<ogc:Literal>3</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
<wfs:Query typeNames="myns:Parks">
<fes:Filter>
<fes:Within>
<fes:ValueReference>geometry</fes:ValueReference>
${AreaOfInterest}
</fes:Within>
</fes:Filter>
</wfs:Query>
<wfs:Query typeNames="myns:Lakes">
<fes:Filter>
<fes:Within>
<fes:ValueReference>region</fes:ValueReference>
${AreaOfInterest}
</fes:Within>
</fes:Filter>
</wfs:Query>
<wfs:Query typeNames="myns:Rivers">
<fes:Filter>
<fes:Within>
<fes:ValueReference>region</fes:ValueReference>
${AreaOfInterest}
</fes:Within>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
<wfs:StoredQueryDefinition id="urn:StoredQueries:FeaturesInPolygon">
<wfs:Title>Features In Polygon</wfs:Title>
<wfs:Abstract>Find all the features in a Polygon.</wfs:Abstract>
<wfs:Parameter name="AreaOfInterest" type="gml:PolygonPropertyType"/>
<wfs:QueryExpressionText
returnFeatureTypes="myns:Parks myns:Lakes myns:Rivers"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
isPrivate="false">
<wfs:Query typeNames="myns:Parks">
<fes:Filter>
<fes:Within>
<fes:ValueReference>geometry</fes:ValueReference>
${AreaOfInterest}
</fes:Within>
</fes:Filter>
</wfs:Query>
<wfs:Query typeNames="myns:Lakes">
<fes:Filter>
<fes:Within>
<fes:ValueReference>region</fes:ValueReference>
${AreaOfInterest}
</fes:Within>
</fes:Filter>
</wfs:Query>
<wfs:Query typeNames="myns:Rivers">
<fes:Filter>
<fes:Within>
<fes:ValueReference>region</fes:ValueReference>
${AreaOfInterest}
</fes:Within>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
</wfs:StoredQueryList>