Element <item>¶
Purpose: Define one selectable item shape within a list.
Why: Use it to declare one independently selectable shape inside a list.
Example¶
1 | |
Decision guide¶
Business value: Defines one independently selectable business shape inside a heterogeneous list.
-
Use when
- One list entry needs its own fields, source, count, or condition.
-
Choose another approach when
- The value is a standalone field or every list entry has the same structure.
-
Prerequisites
- Place it inside list and define the fields belonging to this entry form.
-
Alternatives
- Use nestedKey for repeated records with one common shape. (See:
<nestedKey>)
- Use nestedKey for repeated records with one common shape. (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¶
An item type requires a source.
Attributes: type, source
Why: The type selects the record shape read from the configured source and has no standalone value.
| Valid combination | |
|---|---|
1 | |
| Invalid combination | |
|---|---|
1 | |
separator and sourceScripted require a source.
Attributes: source, separator, sourceScripted
Why: These options change source parsing and cannot affect a purely child-defined item.
| Valid combination | |
|---|---|
1 | |
| Invalid combination | |
|---|---|
1 | |
Allowed parents / Allowed children¶
Allowed parents: else, else-if, if, list, while
Allowed children:
array, element, id, key, list, nestedKey
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 7 attributes
condition
Condition for including the item in the list.
optional; string; Default: null.
separator
Separator for item data.
optional; string; Default: null.
source
Source of data for the item.
optional; string; Default: null.
sourceScripted
Enable or disable scripted sources for the item.
optional; boolean; Default: null.
type
Item type (paired with source).
optional; string; Default: null.
variablePrefix
Prefix before field names inside selectors.
optional; string; Default: null.
variableSuffix
Suffix after field names inside selectors.
optional; string; Default: null.