for $n in (1 to 10)[. mod 2 = 1]
count $c
return <<number count="{ $c }" number="{ $n }"/>>
</syntaxhighlight>
start at $s when fn:true()
only end at $e when $e - $s eq 2
return <<window>>{ $w }<</window>>
</syntaxhighlight>
declare option output:omit-xml-declaration "no";
declare option output:method "xhtml";
<<html/>>
</syntaxhighlight>
'''Result:''' <code><?xml version="1.0" encoding="UTF-8"?><html></html></code>