problem with IF...

Have the following XQuery:

for $a in input()/roleuser
let $c := string($a/user)
let $r := string($a/role)
return
if ($r = “administrator” )
then $a
else ()

which doesn’t work in Tamino 4.1.1.1. But this one does:

for $a in input()/roleuser
let $c := string($a/user)
let $r := string($a/role)
where ($r = “administrator”)
return $a

What am I doing wrong?

Even if I replace “else ()” by “else $a”, it doesn’t work.

Do you guys have any suggestions? am I using the if statement the wrong way?

Thanks in advance,

– Juan

Seems like IfExpr is not implemented as yet with Tamino v4.


Stuart Fyffe-Collins
Software AG (UK) Ltd.

Was suspecting that, just wanted to give it a try.