Element <property>¶
Purpose: Scoped property override for one included XML descriptor.
Why: Use it to pass one scoped literal or evaluated override into an included descriptor.
Example¶
1 | |
Decision guide¶
Business value: Lets a caller configure one include without changing or duplicating the included fragment.
-
Use when
- Passing a literal or computed value into an included XML fragment.
-
Choose another approach when
- Declaring the fragment's accepted interface or changing global runtime configuration.
-
Prerequisites
- Place it inside include and match a param name expected by the fragment.
-
Alternatives
- Use param inside the fragment to declare the accepted input. (See:
<param>)
- Use param inside the fragment to declare the accepted input. (See:
Complete examples¶
Call one typed descriptor fragment with scoped parameters
Use a param contract and include-local properties when several business products share one model shape but require different bounded values.
| parameterized-fragment/fragments/payment.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
| parameterized-fragment/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 | |
Rules and invalid combinations¶
A property requires constant or script.
Attributes: constant, script
Why: The include must receive either a literal value or a caller-context expression to evaluate.
| Valid combination | |
|---|---|
1 | |
| Invalid combination | |
|---|---|
1 | |
Choose constant or script, never both.
Attributes: constant, script
Why: Literal and evaluated values have different validation timing and cannot jointly own one property.
| Valid combination | |
|---|---|
1 | |
| Invalid combination | |
|---|---|
1 | |
constant rejects expression braces.
Attributes: constant, script
Why: Use script for caller-context evaluation; constant is deliberately parse-time literal.
| Valid combination | |
|---|---|
1 | |
| Invalid combination | |
|---|---|
1 | |
Allowed parents / Allowed children¶
Allowed parents: else, else-if, if, include, while
Allowed children:
None
Related concepts and use cases¶
- Dynamic Includes and Fragment Parameters — Explains URI interpolation, scoped include properties, typed fragment params, runtime caller context, nesting, conditions, and cataloged failures for reusable XML composition.
Attributes¶
Show all 3 attributes
constant
Literal value injected into the child include scope. {expr} is forbidden.
optional; string; Default: null.
name
Property key injected into the included descriptor scope.
required; string.
script
Expression evaluated in the direct caller context when the include executes.
optional; string; Default: null.