.rels file management for OPC relationship parts.
Manages a collection of relationships (each with an ID, type URI, and target
path) and renders them to the XML used in .rels files throughout the package.
Summary
Functions
Adds a relationship and returns {updated_rels, rId}.
Returns {rid, target} for the first relationship of the given type, or nil.
Creates relationships from an existing list, setting next_id appropriately.
Creates a new empty relationships collection.
Parses a .rels XML string into a %Relationships{}.
Generates the .rels XML string.
Types
Functions
Adds a relationship and returns {updated_rels, rId}.
Returns {rid, target} for the first relationship of the given type, or nil.
Creates relationships from an existing list, setting next_id appropriately.
Only ids of the form rIdN contribute to next_id; any other id is kept but
ignored when picking the next one, so foreign ids never cause a collision.
@spec new() :: t()
Creates a new empty relationships collection.
Parses a .rels XML string into a %Relationships{}.
Each relationship becomes {id, type, target}, or {id, type, target, true}
when TargetMode="External". Attribute order in the source does not matter.
Generates the .rels XML string.