Function resolveReference

  • Resolve a (possibly relative) reference URI against a base model URI, so an IfcExternalReference.Location like ../shared/grid.ifc becomes an absolute model URI addressable in the registry. Absolute references (with a scheme, or protocol-relative) pass through unchanged.

    Uses the standard URL resolver when the base is absolute; falls back to a plain path join when the base has no scheme (e.g. a bare filename in tests).

    Parameters

    • base: string

      The base model URI the reference was found in.

    • reference: string

      The reference URI (absolute or relative).

    Returns string

    The resolved absolute reference URI.