Skip to main content

collect_id_sources

Function collect_id_sources 

Source
pub fn collect_id_sources(
    val: &JsonLdVal,
    resolver: &ContextResolver,
    source_file: &str,
    out: &mut HashMap<String, String>,
)
Expand description

Walk a JsonLdVal tree and record the source file for every @id value (first-seen wins, consistent with collect_id_spans).

The resulting map is used to determine which file a component’s @id was originally defined in, even when the component is later merged into a parent node (e.g., the module node in components.jsonld).