Class: Lutaml::Xml::HoistingAlgorithm::LCA
- Defined in:
- lib/lutaml/xml/hoisting_algorithm.rb
Overview
LCA (Lowest Common Ancestor) Algorithm
Declares namespace at the smallest subtree covering all usages. This is more compact XML but wider namespace scope.
Instance Method Summary collapse
Instance Method Details
#should_hoist_here?(element, namespace_class, _needs, context) ⇒ Boolean
83 84 85 86 87 |
# File 'lib/lutaml/xml/hoisting_algorithm.rb', line 83 def should_hoist_here?(element, namespace_class, _needs, context) return false if already_hoisted?(namespace_class, context) element_needs_namespace?(element, namespace_class) end |