Reconstructs a GenericElement tree from a RelationSet, by walking it from a given root label along Pcs links - the step Lindholm's paper describes only in passing ("Tm can be reconstructed by traversing from ⊥0 level by level along the PCS relations in Δ", section 6), but that PcsMerger deliberately stops short of, since it's only meaningful once the relation set is actually consistent.
Elements, text and CDATA are all independent PCS nodes, so reconstruction preserves their exact order even for mixed content such as `
Reconstructs the tree rooted at result.rootLabel from result.relations - refusing outright if result.conflicts is non-empty, rather than relying on build(relations, rootLabel)'s own cycle/missing-content detection to catch the problem. That detection isn't a complete substitute for checking conflicts: a "unique parent" conflict (two sides disagreeing about which parent a node belongs to, e.g. Kaining's 10-group-ungroup) can leave both parents' chains individually well-formed - one side's edit simply wins by construction, silently, with no cycle or missing content to trip over - which is exactly why PcsMerger reports it as a conflict in the first place rather than resolving it.
Reconstructs the tree rooted at result.rootLabel from result.relations - refusing outright if result.conflicts is non-empty, rather than relying on build(relations, rootLabel)'s own cycle/missing-content detection to catch the problem. That detection isn't a complete substitute for checking conflicts: a "unique parent" conflict (two sides disagreeing about which parent a node belongs to, e.g. Kaining's 10-group-ungroup) can leave both parents' chains individually well-formed - one side's edit simply wins by construction, silently, with no cycle or missing content to trip over - which is exactly why PcsMerger reports it as a conflict in the first place rather than resolving it.
Value parameters
result
a PcsMerger.merge result.
Attributes
Returns
the rebuilt tree, or a Failure if result.conflicts is non-empty, or (should that somehow not catch it) result.relations still turns out inconsistent.
Reconstructs the tree rooted at rootLabel from relations.
Reconstructs the tree rooted at rootLabel from relations.
Value parameters
relations
a relation set - consistent, or this fails.
rootLabel
the label of the node to treat as the root.
Attributes
Returns
the rebuilt tree, or a Failure if relations has no content for some referenced label, or its Pcs chain for some parent is broken or cyclic (both symptoms of an unresolved conflict having been reconstructed from anyway).