Skip to main content

Module inline

Module inline 

Source
Expand description

Inline type assembly pass

This module implements Phase 3 inline type resolution as specified in XSD_INLINE_TYPE_RESOLUTION_DESIGN.md. It assembles inline type definitions (TypeRefResult::Inline and inline_type fields) into arena TypeKey values.

§Overview

Inline types are anonymous type definitions that appear directly within element declarations, attribute declarations, or as base/item/member types in type derivation. These need to be allocated in the type arenas before the reference resolution phase can complete.

§Work Queue Approach

To avoid borrow conflicts and handle nested inline types, we use a two-pass work queue approach:

  1. Scan Pass: Collect all inline types into InlineTypeJob records. Each job records the owner component and the inline type AST (cloned).

  2. Assembly Pass: For each job, assemble the inline type into the arena and update the owner’s resolved_* field with the TypeKey.

Structs§

InlineAssemblyStats
Statistics from the inline type assembly pass

Functions§

allocate_content_particle_elements
Allocate arena element declarations for local elements in content particles.
allocate_model_group_particle_elements
Allocate arena element declarations for local elements in named model group particles.
assemble_inline_types
Assemble all inline types in the schema set
resolve_local_element_alternatives
XSD 1.1: Assemble inline <xs:alternative> types attached to local element declarations.