Element <else>¶
Purpose:
is the attributeless fallback branch of a . Why: Use it as the unconditional final branch when no earlier condition matched.
Example¶
1 | |
Decision guide¶
Business value: Makes fallback behavior explicit and reviewable.
-
Use when
- A condition block needs work to run after all prior branches fail.
-
Choose another approach when
- A condition must still be evaluated or no fallback behavior is required.
-
Prerequisites
- Place it last inside condition.
-
Alternatives
- Use else-if when the additional branch has its own condition. (See:
<else-if>)
- Use else-if when the additional branch has its own condition. (See:
Complete examples¶
Assemble nested objects, conditional lists, arrays, and branches
Use this shape when one deterministic product combines nested records, heterogeneous list entries, literal arrays, and mutually exclusive fields.
| structured-profile/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
Rules and invalid combinations¶
No additional element-specific rules. Required attributes, types, and supported values are shown below.
Allowed parents / Allowed children¶
Allowed parents: condition, else, else-if, if, while
Allowed children:
All registered DSL elements.
Related concepts and use cases¶
- Structured Data and Rule Pipelines — Shows how composite output shapes and the ordered source-filter, mapping, and target-filter pipeline work together without hiding phase boundaries.
Attributes¶
Show all 0 attributes
None