Zum Inhalt

Element <include>

Zweck: Bindet einen weiteren Descriptor oder eine Properties-Ressource in den aktuellen Setup-Scope ein.

Warum: Verwende dieses Element, um Descriptoren oder Properties wiederzuverwenden, statt Konfiguration zu kopieren.

Beispiel

1
<include uri="path/to/file.xml"/>

Entscheidungshilfe

Fachlicher Nutzen: Hält gemeinsame Modellfragmente und umgebungsspezifische Properties ohne Kopieren wiederverwendbar.

  • Verwenden, wenn

    • Wenn mehrere Descriptoren ein Fragment oder eine Properties-Datei teilen.
    • Wenn URI oder Properties dynamisch ausgewählt werden.
  • Anderen Ansatz wählen, wenn

    • Wenn der Inhalt nicht vertrauenswürdig ist oder einmalig inline verständlicher bleibt.
  • Voraussetzungen

    • Halte den Include-Pfad im Descriptor-Workspace und deklariere referenzierte Properties vorher.
  • Alternativen

    • Halte einen kleinen einmaligen Ablauf direkt im owning setup. (Siehe: <setup>)

Vollständige Beispiele

Ein typisiertes Descriptor-Fragment mit lokalen Parametern aufrufen

Verwende einen param-Vertrag und include-lokale Properties, wenn mehrere fachliche Produkte dieselbe Modellform mit unterschiedlichen begrenzten Werten nutzen.

parameterized-fragment/fragments/payment.xml
1
2
3
4
5
6
7
8
9
<setup>
    <param name="entity_name" description="Product emitted by this fragment."/>
    <param name="scheme" type="enum" values="SEPA SWIFT"/>
    <param name="count" type="int" default="2"/>
    <generate name="{entity_name}" count="{count}" target="LogExporter">
        <id name="id" generator="IncrementGenerator"/>
        <key name="scheme" constant="{scheme}"/>
    </generate>
</setup>
parameterized-fragment/datamimic.xml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<setup>
    <include uri="fragments/payment.xml">
        <property name="entity_name" constant="sepa_payments"/>
        <property name="scheme" constant="SEPA"/>
        <property name="count" constant="3"/>
    </include>
    <include uri="fragments/payment.xml">
        <property name="entity_name" constant="swift_payments"/>
        <property name="scheme" constant="SWIFT"/>
    </include>
</setup>

Regeln und ungültige Kombinationen

I201 — Include File Not Found

Include file '{uri}' not found in task workspace

Warum: The referenced configuration could not be found for the include configuration.

Lösung: Ensure the referenced file exists and the identifier/path is correct.

Vollständige Regel

I202 — Include Properties Parse Failed

Failed to parse include properties file '{uri}': {error}

Warum: The system failed to parse include properties file '{uri}': {error}.

Lösung: Fix the input format and retry.

Vollständige Regel

I203 — Include Unsupported File Type

Unsupported include file type '{uri}'. Only .properties and .xml are supported

Warum: The configuration uses an unsupported include file type '{uri}'. Only .properties and .xml are supported.

Lösung: Use a supported file or adjust the configuration.

Vollständige Regel

I204 — Include Unsupported File Type Generate

Unsupported include file type '{uri}' inside . Only .xml is supported

Warum: The configuration uses an unsupported include file type '{uri}' inside . Only .xml is supported.

Lösung: Use a supported file or adjust the configuration.

Vollständige Regel

I205 — Include Condition Not Boolean

Condition '{condition}' for include '{uri}' evaluated to a non-boolean value (not a valid boolean value): {value}

Warum: A condition evaluated to a non-boolean value in the include configuration.

Lösung: Ensure the expression evaluates to true or false.

Vollständige Regel

I206 — Include Condition Eval Failed

Failed to evaluate condition '{condition}' for include '{uri}': {error}

Warum: The system failed to evaluate condition '{condition}' for include '{uri}': {error}.

Lösung: Fix the expression or script and retry.

Vollständige Regel

I207 — Include Path Outside Descriptor

Include path '{uri}' is outside descriptor directory '{descriptor_dir}' or violates relative-path policy: {reason}

Warum: The include path is outside the descriptor directory or does not follow relative-path requirements.

Lösung: Use a relative include path under descriptor_dir.

Vollständige Regel

I208 — Include Dynamic Properties With Overlay

Include '{uri}' resolved to a .properties file, but children are only supported for XML descriptor includes

Warum: The include resolved to a .properties file even though the descriptor configured XML-only property overlays.

Lösung: Remove the children or resolve the include to an XML descriptor.

Vollständige Regel

I616 — Parser Include Property Duplicate

Duplicate in is not allowed

Warum: The include configuration defines the same scoped property name more than once.

Lösung: Remove or rename the duplicate entry.

Vollständige Regel

I617 — Parser Include Property On Properties

Element cannot define children for .properties includes

Warum: Scoped include properties are only supported when the include target is an XML descriptor.

Lösung: Remove the children or change the include target to an XML descriptor.

Vollständige Regel

I618 — Parser Include Param Missing

Fragment contract violation for

{contract_table}

{missing_summary}

Warum: The included fragment declares required params that were not supplied by the caller.

Lösung: Supply the missing values or define defaults on the fragment declarations.

Vollständige Regel

I619 — Parser Include Param Invalid Value

Invalid value for param '{param_name}' in . Expected {expected_detail}; provided '{provided_value}'

Warum: The include caller supplied a literal value that does not satisfy the fragment param contract.

Lösung: Update the value to match the declared param type or enum values.

Vollständige Regel

Erlaubte Elternelemente / Erlaubte Kindelemente

Erlaubte Elternelemente: else, else-if, generate, if, iterate, setup, while

Erlaubte Kindelemente:

property

  • Dynamische Includes und Fragmentparameter — Explains URI interpolation, scoped include properties, typed fragment params, runtime caller context, nesting, conditions, and cataloged failures for reusable XML composition.
  • Erstes DATAMIMIC-Modell — Builds the smallest model and then composes preparation and generation stages.

Attribute

Alle 2 Attribute anzeigen

condition

Condition expression to evaluate whether to include this file.

optional; string; Standardwert: null.

uri

URI of the file to include.

erforderlich; string.