first argument - any XPRESS expression
second arguments - series of <case> elements
The first argument is evaluated and compared against each of the <case> elements until a match is found. The <switch> function evaluates to the first <case> for which there is a match. If no match is found, the <switch> evaluates to the <case> element where default=’true’.
The following expression returns apples.
<switch> <s>A</s> <case default=’true’> <s>unknown</s> </case> <case> <s>A</s> <s>apples</s> </case> <case> <s>B</s> <s>oranges</s> </case> </switch>