that have already been implemented in BaseX.
==General Enhanced FLWOR Expressions==
{{Mark|Introduced with Version 7.7:}}
for $city in $country//city[population > 1000000]
group by $name
return <<country name='{ $name }'>>{ $city/name }</country></pre> A new {{Code|count}} clause enhances the FLWOR expression with a variable that enumerates the iterated tuples. <pre class="brush:xquery">for $n in (1 to 10)[. mod 2 = 1]count $creturn <number count="{ $c }" number="{ $n }"/></countrypre> The {{Code|allowing empty}} provides functionality similar to outer joins in SQL: <pre class="brush:xquery">for $n allowing empty in ()return 'empty? ' || empty($n)</pre> Window clauses extend FLWOR clauses by generating sub-sequences of the iterated tuples. More information can be found in the [http://www.w3.org/TR/2013/CR-xquery-30-20130108/#id-windows specification]. An example: <pre class="brush:xquery">for tumbling window $w in (2, 4, 6, 8, 10, 12, 14) start at $s when fn:true() only end at $e when $e - $s eq 2return <window>{ $w }</window>
</pre>