Class: Lutaml::Xml::UnqualifiedInheritanceStrategy

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

Overview

Strategy for elementFormDefault="unqualified" (W3C DEFAULT) Child elements are in blank namespace

This implements W3C XML Schema default behavior when a schema does NOT declare elementFormDefault or declares elementFormDefault="unqualified". Locally declared elements are NOT in the target namespace by default.

Exception: Complex types (models) may optionally inherit based on configuration via native_types_inherit setting.

See Also:

Instance Method Summary collapse

Instance Method Details

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

Children do NOT inherit parent namespace (W3C default)



24
25
26
27
28
29
30
31
# File 'lib/lutaml/xml/unqualified_inheritance_strategy.rb', line 24

def inherits?(element_type:, parent_ns_decl:, mapping:)
  # W3C Rule: elementFormDefault="unqualified" means children in blank namespace
  # This is the W3C DEFAULT behavior when elementFormDefault is not specified
  #
  # Children must explicitly declare xmlns="" to prevent inheriting
  # the default namespace declaration from parent element
  false
end