Class: Lutaml::Xml::QualifiedInheritanceStrategy

Inherits:
NamespaceInheritanceStrategy show all
Defined in:
lib/lutaml/xml/qualified_inheritance_strategy.rb

Overview

Strategy for elementFormDefault=“qualified” All child elements inherit parent namespace

This implements W3C XML Schema behavior when a schema declares elementFormDefault=“qualified”, meaning all locally declared elements are in the target namespace by default.

Instance Method Summary collapse

Instance Method Details

#inherits?(element_type:, parent_ns_decl:, mapping:) ⇒ Boolean

All elements inherit parent namespace when qualified

Parameters:

  • element_type (Symbol)

    :model or :native_value (not used in this strategy)

  • parent_ns_decl (NamespaceDeclaration)

    parent’s namespace declaration

  • mapping (Xml::Mapping)

    the mapping being evaluated (not used in this strategy)

Returns:

  • (Boolean)

    always true - all children inherit



20
21
22
23
24
# File 'lib/lutaml/xml/qualified_inheritance_strategy.rb', line 20

def inherits?(element_type:, parent_ns_decl:, mapping:)
  # W3C Rule: elementFormDefault="qualified" means ALL children inherit
  # regardless of whether they are complex types (models) or simple types (values)
  true
end