[xquery-talk] Finding context position when "order by" is in a
FLWOR?
David Carlisle
davidc at nag.co.uk
Fri Sep 8 23:54:21 PDT 2006
> position() doesn't seem to help. The best approach I come up with
> is to wrap the above FLWOR in another one:
well there's
(let $list := ( 'cat', 'dog', 'apple')
for $word at $pos in $list
order by $word
return <word>{$word}</word>)/
<word n="{position()}">{text()}</word>
which does use postion() but I don't think it's any clearer really.
David
More information about the talk
mailing list