supporting if ternary in scriptlet print rule