Hi Rob,

Just a thought: shouldn’t util:if not just be part of the regular BaseX syntax? Together with fn:for-each, the fn:fold functions and hof:fold-left1, they represent the group of procesflow-controll-functions.

From a syntactical view, util:if is just a function (which simulates the behavior of the standard “if expression”).

Does this help?
Christian