Module: Lutaml::Xml::PlanOrder

Defined in:
lib/lutaml/xml/plan_order.rb

Overview

Reconstructs element_order for ordered/mixed models from the leptris node surface in one native pass, mirroring the interpretive AdapterElement#order contract: text runs, CDATA, comments, PIs, and element entries (local name + namespace uri/prefix) in document order, frozen like the interpretive product.

Constant Summary collapse

TEXT_MARKER =
"text"
CDATA_MARKER =
"#cdata-section"
COMMENT_MARKER =
"comment"

Class Method Summary collapse

Class Method Details

.build(node) ⇒ Object



17
18
19
20
# File 'lib/lutaml/xml/plan_order.rb', line 17

def build(node)
  node.children.filter_map { |child| entry_for(child) }
    .each(&:freeze).freeze
end