declare variable $eachPhase := 5;
for $h at $p in $t where $p=1
return
for $f in $phases
let $f-name := fn:concat($f, "of-phase")
return
if ($eachPhase gt 5) then
$h
else $h(next value of $h)
在else部分我想返回h的下一个索引值 假设 $h 变量值是 abc bcd dex
所以在 if 部分它应该返回 $h 是 abc 但在其他部分它应该返回 bcd
如何实现?