Description
The Choose component is used in conjunction with When and Otherwise
components to express mutually exclusive conditional tests.
The Choose component must contain one or more When componets and
can contain only one optional Otherwise component (which must occur
after all of the When components). If the Choose component only
contains one When element, then for all practical purposes, it behaves
just like the Conditional component. When faced with three or more
choices, this component behaves like a switch/case/default statement.
Each When component is examined in the order of occurrence. If
and when the condition expression is satisfied the content in that
component is rendered. Then all further When components are ignored.
The optional Otherwise component is also automatically ignored.
If none of the conditions in any When component is satisfied , then
the Otherwise component is automatically selected (if it is present)
and the content associated with that element is rendered.
The body of the Choose component can only contain:
- White spaces
May appear anywhere around the When and Otherwise components.
- 1 or more When components
Must all appear before Otherwise.
- 0 or 1 Otherwise component
Must be the last component nested within Choose
For simple conditional testing, use the Conditional component.
|