1. A method for capturing user interface (UI) switch states, comprising: adding a state attribute to a UI switch control, the state attribute containing an expression; evaluating the expression relative to a UI binding of the UI switch control, if given, or a UI binding of a context node of the UI switch control, otherwise; and interpreting a result of the expression as a data layer node whose content is an ID reference to a case of UI controls that must be selected by the UI switch control.