tamino 4.2.1.1 / if-then-else

Is if-then-else supported? every doc/tutorial I’ve found on x-query implies this should work -

for $parent in input()/alioncorporate[@objectId <50> 40)
then $p
else ()
)

but it chokes on “then” saying it’s expecting mod div % = <= >= sort stable blah blah blah.

If I remember correctly if-then-else support was added in Tamino 4.4.1; you’ll need to upgrade to use it.

Hi,

it looks like your example is lacking the “if ( condition ) part” - here is the complete example I found on the internet:

for $parent in input()//alioncorporate[@objectId <50> 40)
then $parent/@objectId
else ()
)

The query is accepted by Tamino 8.0 - but should also be valid with 4.4

Regards
Uli

the forum software has a tendency to mangle posted code. Try enclosing the sample in square-brace code tags - {code}…{/code} but with square braces.